Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

lerp_q12_i32

Function lerp_q12_i32 

Source
pub fn lerp_q12_i32(first: i32, second: i32, fraction: i32) -> i32
Expand description

Bounded Q12 interpolation with truncation toward the lower fixed point.

This is the cheap path for Quake/PXBSP i16 positions and byte attributes: their maximum delta times 4096 fits in i32. Renderers with wider source coordinates must use lerp_q12_i32_wide.