Skip to main content

unit

Function unit 

Source
pub fn unit(a: [f64; 2], b: [f64; 2]) -> ([f64; 2], f64)
Expand description

Unit vector from a to b and the distance (a zero-length segment points along x).