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

◆ fract8

typedef u8 fl::fract8

Fixed-Point Fractional Types.

Types for storing fractional data.

  • sfract7 should be interpreted as signed 128ths.
  • fract8 should be interpreted as unsigned 256ths.
  • sfract15 should be interpreted as signed 32768ths.
  • fract16 should be interpreted as unsigned 65536ths.

Example: if a fract8 has the value "64", that should be interpreted as 64/256ths, or one-quarter.

accumXY types should be interpreted as X bits of integer, and Y bits of fraction.
E.g., accum88 has 8 bits of int, 8 bits of fraction ANSI: unsigned short _Fract. Range is 0 to 0.99609375 in steps of 0.00390625.
Should be interpreted as unsigned 256ths.

Definition at line 49 of file int.h.