FastLED 3.9.15
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 67 of file primitives.h.

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