Skip to main content

nearest_triangle2_point2

Function nearest_triangle2_point2 

Source
pub fn nearest_triangle2_point2<S>(
    _triangle: Triangle<S>,
    _point: Point2<S>,
) -> ([Normalized<S>; 2], Point2<S>)
where S: OrderedField,
Expand description

Returns the nearest 2D point on 2D triangle together with barycentric coordinates in relation to the triangle edges $ab$ and $ac$