Implement FMOD function for fixed-point modulo

Fixes #1021
This commit is contained in:
Rangi
2022-08-27 12:40:55 -04:00
committed by Eldred Habert
parent 1a1f1365e6
commit 425339ccf6
6 changed files with 19 additions and 0 deletions

View File

@@ -119,6 +119,14 @@ int32_t fix_Div(int32_t i, int32_t j)
return double2fix(fix2double(i) / fix2double(j));
}
/*
* Modulo
*/
int32_t fix_Mod(int32_t i, int32_t j)
{
return double2fix(fmod(fix2double(i), fix2double(j)));
}
/*
* Power
*/