1//! 直線と点の距離 2 3use crate::geom::*; 4 5/// 直線と点の距離を求める 6pub fn dist_line_point(l: Line, p: Vector) -> f64 { 7 l.diff().cross(p - l.from).abs() / l.abs() 8}