pub fn point_to_line_distance<P: GetXY + GetZ, Q: GetXY + GetZ>(
line: &[P],
point: &Q,
method: Option<DistanceMethod>,
) -> f64Expand description
Check to see how far away the point is from the line. Supports both Euclidean and Haversine methods
§Parameters
line: the line to check againstpoint: the point to check if it is on the linemethod: the method to use, either ‘euclidean’ or ‘haversine’. Defaults toDistanceMethod::Euclidean
§Returns
The shortest distance between the point and a line. Returns -1 if line is empty