import { compute_triangle_area_3d } from "../triangle/compute_triangle_area_3d.js";

/**
 *
 * @param {TopoTriangle} face
 * @returns {number}
 */
export function tm_face_area(face) {
    const v0 = face.vertices[0];
    const v1 = face.vertices[1];
    const v2 = face.vertices[2];

    return compute_triangle_area_3d(
        v0.x, v0.y, v0.z,
        v1.x, v1.y, v1.z,
        v2.x, v2.y, v2.z
    );
}
