Skip to main content

triangle_normal

Function triangle_normal 

Source
pub fn triangle_normal(
    positions: &[f32],
    a: u32,
    b: u32,
    c: u32,
) -> Option<[f64; 3]>
Expand description

三角形单位法线;退化(重合顶点或近共线)返回 None。

与 TS triangleNormal 一致:全部在 f64 下计算,length <= scale²·1e-12 判退化。