Normalises start and end points by given width and height. Useful for converting an absolutely-defined line to a relative one.
// Line 1,1 -> 10,10const l = Lines.fromNumbers(1,1,10,10);const ll = Lines.normaliseByRect(l, 10, 10);// Yields: 0.1,0.1 -> 1,1 Copy
// Line 1,1 -> 10,10const l = Lines.fromNumbers(1,1,10,10);const ll = Lines.normaliseByRect(l, 10, 10);// Yields: 0.1,0.1 -> 1,1
Normalises start and end points by given width and height. Useful for converting an absolutely-defined line to a relative one.