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

◆ fromFrac()

template<typename T>
T fl::gfx::fromFrac ( int p,
int q )
inline

Convert rational p/q to Coord without float.

For s16x16: integer multiply+divide. For float: float divide.

Definition at line 69 of file primitives.h.

69{ return T(static_cast<float>(p) / static_cast<float>(q)); }

References fl::FL_NO_EXCEPT.