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

◆ lookup1_values()

static int32_t fl::third_party::vorbis::lookup1_values ( int32_t entries,
int32_t dim )
static

Definition at line 965 of file stb_vorbis.cpp.hpp.

966{
967 int32_t r = (int32_t) floor(exp((float) log((float) entries) / dim));
968 if ((int32_t) floor(pow((float) r+1, dim)) <= entries) // (int32_t) cast for MinGW warning;
969 ++r; // floor() to avoid _ftol() when non-CRT
970 if (pow((float) r+1, dim) <= entries)
971 return -1;
972 if ((int32_t) floor(pow((float) r, dim)) > entries)
973 return -1;
974 return r;
975}
constexpr enable_if< is_fixed_point< T >::value, T >::type floor(T x) FL_NOEXCEPT
double log(double value) FL_NOEXCEPT
Definition math.h:419
enable_if< is_fixed_point< T >::value, T >::type pow(T base, T exp) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type exp(T x) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220

References exp(), FL_NOEXCEPT, floor(), log(), and pow().

Referenced by start_decoder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: