pub fn tetrahedron_barycentric(
corners: [Point3; 4],
point: Point3,
tolerance: Tolerance,
) -> Result<[Scalar; 4], BarycentricError>Expand description
Barycentric coordinates of point in a tetrahedron, as weights of its
four corners in order.
Each weight is the signed volume of the sub-tetrahedron opposite its corner over the tetrahedron’s volume, so the corner order’s handedness does not matter.
§Errors
BarycentricError::NonFinite, or BarycentricError::Degenerate when
the tetrahedron’s least altitude is not above tolerance.linear().