FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fmod_impl_float()

float fl::fmod_impl_float ( float x,
float y )

Definition at line 401 of file math.cpp.hpp.

401 {
402#if FL_MATH_USE_LIBM
403 return ::fmodf(x, y);
404#else
405 if (y == 0.0f) return 0.0f;
406 const float q = x / y;
407 // Truncate toward zero (libm fmod convention).
408 const float t = q >= 0.0f ? floor_impl_float(q) : ceil_impl_float(q);
409 return x - t * y;
410#endif
411}
float ceil_impl_float(float value)
Definition math.cpp.hpp:61
float floor_impl_float(float value)
Definition math.cpp.hpp:43

References ceil_impl_float(), floor_impl_float(), t, x, and y.

Referenced by fmod(), and fmodf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: