FastLED 3.9.7
Loading...
Searching...
No Matches
qfx< T, F, I > Class Template Reference

Detailed Description

template<class T, int F, int I>
class qfx< T, F, I >

Template class for representing fractional ints.

Template Parameters
Tunderlying type for data storage
Fnumber of fractional bits
Inumber of integer bits

Definition at line 16 of file qfx.h.

#include <qfx.h>

Public Member Functions

 qfx (float fx)
 Constructor, storing a float as a fractional int.
 
 qfx (uint8_t _i, uint8_t _f)
 Constructor, storing a fractional int directly.
 
uint32_t operator* (uint32_t v)
 Multiply the fractional int by a value.
 
uint16_t operator* (uint16_t v)
 Multiply the fractional int by a value.
 
int32_t operator* (int32_t v)
 Multiply the fractional int by a value.
 
int16_t operator* (int16_t v)
 Multiply the fractional int by a value.
 

Constructor & Destructor Documentation

◆ qfx() [1/2]

template<class T , int F, int I>
qfx< T, F, I >::qfx ( float fx)
inline

Constructor, storing a float as a fractional int.

Definition at line 21 of file qfx.h.

◆ qfx() [2/2]

template<class T , int F, int I>
qfx< T, F, I >::qfx ( uint8_t _i,
uint8_t _f )
inline

Constructor, storing a fractional int directly.

Definition at line 23 of file qfx.h.

Member Function Documentation

◆ operator*() [1/4]

template<class T , int F, int I>
int16_t qfx< T, F, I >::operator* ( int16_t v)
inline

Multiply the fractional int by a value.

Definition at line 32 of file qfx.h.

◆ operator*() [2/4]

template<class T , int F, int I>
int32_t qfx< T, F, I >::operator* ( int32_t v)
inline

Multiply the fractional int by a value.

Definition at line 30 of file qfx.h.

◆ operator*() [3/4]

template<class T , int F, int I>
uint16_t qfx< T, F, I >::operator* ( uint16_t v)
inline

Multiply the fractional int by a value.

Definition at line 28 of file qfx.h.

◆ operator*() [4/4]

template<class T , int F, int I>
uint32_t qfx< T, F, I >::operator* ( uint32_t v)
inline

Multiply the fractional int by a value.

Definition at line 26 of file qfx.h.


The documentation for this class was generated from the following file: