Skip to main content

triangle_area

Function triangle_area 

Source
pub fn triangle_area(v0: [f64; 3], v1: [f64; 3], v2: [f64; 3]) -> f64
Expand description

Compute the area of a triangle defined by three 3-D vertices.

Uses the cross-product formula: area = ||(v1-v0) × (v2-v0)|| / 2.