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

scale_rgb

Function scale_rgb 

Source
pub fn scale_rgb(rgb: (u8, u8, u8), num: i32, den: i32) -> (u8, u8, u8)
Expand description

Scale each channel by a signed ratio, truncating toward zero, then clamp. den must be nonzero, each channel product must fit i32, and a product of i32::MIN must not be divided by -1.