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

◆ predict_point()

static int32_t fl::third_party::vorbis::predict_point ( int32_t x,
int32_t x0,
int32_t x1,
int32_t y0,
int32_t y1 )
static

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

1664{
1665 int32_t dy = y1 - y0;
1666 int32_t adx = x1 - x0;
1667 // @OPTIMIZE: force int division to round in the right direction... is this necessary on x86?
1668 int32_t err = abs(dy) * (x - x0);
1669 int32_t off = err / adx;
1670 return dy < 0 ? y0 - off : y0 + off;
1671}
fl::i32 int32_t
Definition coder.h:220
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NOEXCEPT

References fl::abs(), FL_NOEXCEPT, and fl::x.

Referenced by vorbis_decode_packet_rest().

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