/**
 * Uses Green's Theorem to compute area of a 2d triangle
 * @param {number} x0
 * @param {number} y0
 * @param {number} x1
 * @param {number} y1
 * @param {number} x2
 * @param {number} y2
 * @returns {number}
 */
export function triangle2d_compute_area(
    x0, y0,
    x1, y1,
    x2, y2
) {

    return (
        (x0 * y1 - y0 * x1)
        + (x1 * y2 - y1 * x2)
        + (x2 * y0 - y2 * x0)
    ) * 0.5;

}
