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

lerp_rgb

Function lerp_rgb 

Source
pub fn lerp_rgb(
    a: (u8, u8, u8),
    b: (u8, u8, u8),
    num: u16,
    den: u16,
) -> (u8, u8, u8)
Expand description

Interpolate using signed division toward zero. Clamp the numerator to the original denominator before replacing a zero divisor with one. Therefore a zero denominator always returns a, matching the caller contract.