Skip to main content

normalize

Function normalize 

Source
pub fn normalize(r: Rect) -> Rect
Expand description

Swaps whichever pairs of edges are out of order.

use pdfrum_doc::geom;

let inverted = geom::rect(10.0, 8.0, 4.0, 0.0);
assert_eq!(geom::normalize(inverted), geom::rect(4.0, 0.0, 10.0, 8.0));