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

◆ floatToSfract15()

LIB8STATIC sfract15 floatToSfract15 ( float f)

Conversion from IEEE754 float in the range (-1,1) to 16-bit fixed point (sfract15).

Note
The extremes of one and negative one are NOT representable! The representable range is 0.99996948242 to -0.99996948242, in steps of 0.00003051757.

Definition at line 406 of file lib8tion.h.

407{
408 return f * 32768.0;
409}

References LIB8STATIC.