MCPcopy Create free account
hub / github.com/FastLED/FastLED / highest_bit

Function highest_bit

src/fl/gfx/gamma_lut.h:71–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71constexpr int highest_bit(u32 v) FL_NOEXCEPT {
72 return v == 0 ? -1 : hb_step(v, 0);
73}
74
75// ---- Fixed-point log2 (signed result, negative for inputs < 1.0) ----
76// Uses 4-term minimax polynomial for log2(1+t), t in [0,1).

Callers 14

log2_fpFunction · 0.85
u8x24Class · 0.85
s12x4Class · 0.85
s24x8Class · 0.85
s8x8Class · 0.85
u8x8Class · 0.85
lerpFunction · 0.85
s4x12Class · 0.85
lerpFunction · 0.85
s8x24Class · 0.85
u24x8Class · 0.85
log2_fpMethod · 0.85

Calls 1

hb_stepFunction · 0.85

Tested by

no test coverage detected