Expand description
Primitive line-height helpers.
These helpers expose explicit line-height calculations and a small readable threshold check.
§Examples
use use_line_height::{LineHeight, is_readable_line_height, line_height_px, line_height_ratio};
let line_height = LineHeight::new(16.0, 24.0).unwrap();
assert_eq!(line_height.px(), 24.0);
assert!((line_height.ratio() - 1.5).abs() < 1.0e-12);
assert!((line_height_px(16.0, 1.5).unwrap() - 24.0).abs() < 1.0e-12);
assert!((line_height_ratio(16.0, 24.0).unwrap() - 1.5).abs() < 1.0e-12);
assert!(is_readable_line_height(1.5).unwrap());