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

◆ halfOf()

template<typename T>
T fl::gfx::halfOf ( T val)
inline

Divide Coord by 2 using shift (avoids expensive division on embedded).

s16x16: raw right-shift (1 instruction). float: multiply by 0.5.

Definition at line 77 of file primitives.h.

77{ return val / fromInt<T>(2); }
T fromInt(int n)
Convert an integer to Coord without float intermediate.
Definition primitives.h:57

References fromInt().

+ Here is the call graph for this function: