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

◆ atan() [2/2]

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

Definition at line 152 of file s12x4.h.

152 {
153 constexpr s12x4 one(1.0f);
154 constexpr s12x4 pi_over_2(1.5707963f);
155 bool neg = x.mValue < 0;
156 s12x4 ax = abs(x);
158 if (ax <= one) {
159 result = atan_unit(ax);
160 } else {
161 result = pi_over_2 - atan_unit(one / ax);
162 }
163 return neg ? -result : result;
164 }
constexpr FASTLED_FORCE_INLINE s12x4 abs() const FL_NOEXCEPT
Definition s12x4.h:235
static FASTLED_FORCE_INLINE s12x4 atan_unit(s12x4 t) FL_NOEXCEPT
Definition s12x4.h:391
constexpr s12x4() FL_NOEXCEPT=default
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

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

+ Here is the call graph for this function: