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

◆ atan() [2/2]

static FASTLED_FORCE_INLINE s24x8 fl::s24x8::atan ( s24x8 x)
inlinestatic

Definition at line 162 of file s24x8.h.

162 {
163 constexpr s24x8 one(1.0f);
164 constexpr s24x8 pi_over_2(1.5707963f);
165 bool neg = x.mValue < 0;
166 s24x8 ax = abs(x);
168 if (ax <= one) {
169 result = atan_unit(ax);
170 } else {
171 result = pi_over_2 - atan_unit(one / ax);
172 }
173 return neg ? -result : result;
174 }
constexpr s24x8() FL_NOEXCEPT=default
static FASTLED_FORCE_INLINE s24x8 atan_unit(s24x8 t) FL_NOEXCEPT
Definition s24x8.h:400
constexpr FASTLED_FORCE_INLINE s24x8 abs() const FL_NOEXCEPT
Definition s24x8.h:244
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References s24x8(), abs(), atan_unit(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, and fl::x.

+ Here is the call graph for this function: