Function triangle_normal

Source
pub fn triangle_normal<T>(
    p1: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>,
    p2: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>,
    p3: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>,
) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where T: RealNumber,
Expand description

The normal vector of the given triangle.

The normal is computed as the normalized vector cross(p2 - p1, p3 - p1).