//! Miscellaneous math functions. use crate::vector::Vec3; /// Calculates the surface normal of a triangle. #[must_use] pub fn calc_triangle_surface_normal( egde_a: &Vec3, edge_b: &Vec3, edge_c: &Vec3, ) -> Vec3 { let v1 = edge_b.clone() - egde_a.clone(); let v2 = edge_c.clone() - egde_a.clone(); v1.cross(&v2) }