FastLED 3.10.8
Loading...
Searching...
No Matches

◆ fmod_impl_float()

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

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

483 {
484#if FL_MATH_USE_LIBM
485 return ::fmodf(x, y);
486#else
487 if (y == 0.0f) return 0.0f;
488 const float q = x / y;
489 // Truncate toward zero (libm fmod convention).
490 const float t = q >= 0.0f ? floor_impl_float(q) : ceil_impl_float(q);
491 return x - t * y;
492#endif
493}
float floor_impl_float(float value) FL_NO_EXCEPT
Definition math.cpp.hpp:44
float ceil_impl_float(float value) FL_NO_EXCEPT
Definition math.cpp.hpp:62

References ceil_impl_float(), FL_NO_EXCEPT, 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: