pub fn width(r: Rect) -> f32Expand description
right - left, which is negative for an inverted rectangle.
use pdfrum_doc::geom;
assert_eq!(geom::width(geom::rect(4.0, 0.0, 10.0, 8.0)), 6.0);
// Inverted: the subtraction is not corrected.
assert_eq!(geom::width(geom::rect(10.0, 0.0, 4.0, 8.0)), -6.0);