fmod is not mathematically valid. Replace it by a correct one.

This commit is contained in:
Godzil
2020-03-04 16:15:49 +00:00
parent 107b612130
commit 1b6c14691b
5 changed files with 9 additions and 4 deletions

View File

@@ -23,4 +23,9 @@ double max3(double a, double b, double c);
double frand();
static double modulo(double a, double b)
{
return a - floor(a/b) * b;
}
#endif /* DORAYME_MATH_HELPER_H */