Skip to main content

tetra_volume

Function tetra_volume 

Source
fn tetra_volume(
    a: CartesianCoordinates,
    b: CartesianCoordinates,
    c: CartesianCoordinates,
    d: CartesianCoordinates,
) -> f64
Expand description

Computes the signed volume of a tetrahedron defined by four 3D points.

§Arguments

  • a, b, c, d - The vertices of the tetrahedron (3D coordinates).

§Returns

The absolute value of the mixed product divided by 6, which gives the volume of the tetrahedron.