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

◆ atan() [2/2]

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

Definition at line 162 of file s8x24.h.

162 {
163 constexpr s8x24 one(1.0f);
164 constexpr s8x24 pi_over_2(1.5707963f);
165 bool neg = x.mValue < 0;
166 s8x24 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 FASTLED_FORCE_INLINE s8x24 abs() const FL_NOEXCEPT
Definition s8x24.h:244
constexpr s8x24() FL_NOEXCEPT=default
static FASTLED_FORCE_INLINE s8x24 atan_unit(s8x24 t) FL_NOEXCEPT
Definition s8x24.h:398
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

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

+ Here is the call graph for this function: