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

◆ toQ16()

template<typename Coord>
fl::i32 fl::gfx::detail::toQ16 ( Coord val)
inline

Convert any Coord type to Q16.16 raw i32 for integer inner loops.

s16x16: direct raw access (already Q16.16, zero overhead). float/double: multiply by 65536. int: shift left by 16.

Definition at line 223 of file primitives.h.

223 {
224 return static_cast<fl::i32>(val.to_float() * 65536.0f);
225}

References toQ16().

Referenced by toQ16(), toQ16< double >(), toQ16< fl::s16x16 >(), toQ16< float >(), and toQ16< int >().

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