FastLED 3.9.15
Loading...
Searching...
No Matches
Float-to-Fixed and Fixed-to-Float Conversions

Detailed Description

Functions to convert between floating point and fixed point types.

Note
Anything involving a "float" on AVR will be slower.
+ Collaboration diagram for Float-to-Fixed and Fixed-to-Float Conversions:

Functions

LIB8STATIC sfract15 floatToSfract15 (float f)
 Conversion from IEEE754 float in the range (-1,1) to 16-bit fixed point (sfract15).
 
LIB8STATIC float sfract15ToFloat (sfract15 y)
 Conversion from 16-bit fixed point (sfract15) to IEEE754 32-bit float.