FastLED 3.9.15
Loading...
Searching...
No Matches
fl::fixed_point< IntBits, FracBits, S > Class Template Reference

Detailed Description

template<int IntBits, int FracBits, Sign S>
class fl::fixed_point< IntBits, FracBits, S >

Definition at line 129 of file fixed_point.h.

#include <fixed_point.h>

+ Inheritance diagram for fl::fixed_point< IntBits, FracBits, S >:
+ Collaboration diagram for fl::fixed_point< IntBits, FracBits, S >:

Public Member Functions

FASTLED_FORCE_INLINE constexpr fixed_point () FL_NOEXCEPT
 
template<int OtherInt, int OtherFrac, Sign OtherSign>
constexpr fixed_point (const fixed_point< OtherInt, OtherFrac, OtherSign > &other, typename enable_if< is_fp_promotable< fixed_point< OtherInt, OtherFrac, OtherSign >, fixed_point< IntBits, FracBits, S > >::value, int >::type=0) FL_NOEXCEPT
 
FASTLED_FORCE_INLINE constexpr fixed_point (float f) FL_NOEXCEPT
 
template<typename IntT, detail::enable_if_integer_t< IntT > = 0>
FASTLED_FORCE_INLINE constexpr fixed_point (IntT n) FL_NOEXCEPT
 
constexpr fixed_point (RawType raw, typename Base::RawTag tag) FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator!= (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator* (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator* (i32 scalar) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator+ (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator- () const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator- (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator/ (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator< (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator<< (int shift) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator<= (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator== (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator> (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE bool operator>= (fixed_point b) const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE fixed_point operator>> (int shift) const FL_NOEXCEPT
 
FASTLED_FORCE_INLINE constexpr RawType raw () const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE float to_float () const FL_NOEXCEPT
 
constexpr FASTLED_FORCE_INLINE i32 to_int () const FL_NOEXCEPT
 

Static Public Member Functions

static constexpr FASTLED_FORCE_INLINE fixed_point abs (fixed_point x) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point acos (fixed_point x) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point asin (fixed_point x) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point atan (fixed_point x) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point atan2 (fixed_point y, fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point ceil (fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point clamp (fixed_point x, fixed_point lo, fixed_point hi) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point cos (fixed_point angle) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point floor (fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point fract (fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point from_raw (RawType raw) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point lerp (fixed_point a, fixed_point b, fixed_point t) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point max (fixed_point a, fixed_point b) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point min (fixed_point a, fixed_point b) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point mod (fixed_point a, fixed_point b) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point pow (fixed_point base, fixed_point exp) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point rsqrt (fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point sign (fixed_point x) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point sin (fixed_point angle) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE void sincos (fixed_point angle, fixed_point &out_sin, fixed_point &out_cos) FL_NOEXCEPT
 
static FASTLED_FORCE_INLINE fixed_point smoothstep (fixed_point edge0, fixed_point edge1, fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point sqrt (fixed_point x) FL_NOEXCEPT
 
static constexpr FASTLED_FORCE_INLINE fixed_point step (fixed_point edge, fixed_point x) FL_NOEXCEPT
 

Private Types

using Base = typename fixed_point_impl<IntBits, FracBits, S>::type
 
using PromotionType = typename conditional<(S == Sign::SIGNED), i64, u64>::type
 
using RawType = decltype(Base().raw())
 

Static Private Member Functions

template<int OtherFrac, typename OtherRawType>
static constexpr RawType promote_fp (OtherRawType other_raw) FL_NOEXCEPT
 

Friends

constexpr fixed_point operator* (i32 scalar, fixed_point fp) FL_NOEXCEPT
 

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