pub fn normalize(z: i32) -> Option<f32>
Expand description
Normalizes a CSS z-index to an f32 floating-point number between 0.0 and 1.0.
This is the most hassle-free way to use this crate if you don’t need to customize the ranges.
let z_ = 2_147_483_647;
let z = normalize(z_);
assert_eq!(z, Some(1.0));