elrnv / meshx

Mesh eXchange library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Triangle normal as array calculates the centroid instead

Anaphory opened this issue · comments

meshx/src/prim/triangle.rs

Lines 154 to 162 in 4b1e17e

impl<'a, T> Normal<[T; 3]> for &'a Triangle<T>
where
T: Scalar + ClosedAdd<T> + ClosedDiv<T> + num_traits::FromPrimitive,
{
#[inline]
fn normal(self) -> [T; 3] {
<Self as Centroid<Vector3<T>>>::centroid(self).into()
}
}

Good catch, thank you!