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

◆ fastMag()

static u16 fl::audio::fft::Context::fastMag ( i32 re,
i32 im )
inlinestaticprivate

Definition at line 336 of file fft_impl.cpp.hpp.

336 {
337 u32 a = (re >= 0) ? static_cast<u32>(re) : static_cast<u32>(-re);
338 u32 b = (im >= 0) ? static_cast<u32>(im) : static_cast<u32>(-im);
339 u32 mx = (a > b) ? a : b;
340 u32 mn = (a <= b) ? a : b;
341 static constexpr u16x16 kMinWeight(0.40625f);
342 return static_cast<u16>(mx + (kMinWeight * static_cast<i32>(mn)).to_int());
343 }

Referenced by batchMag(), runNaive(), and runOctaveWise().

+ Here is the caller graph for this function: