area2 static method
Returns twice the signed area of the triangle p1-p2-p3. The area is positive if the triangle is oriented CCW, and negative if CW.
Implementation
static double area2(Coordinate p1, Coordinate p2, Coordinate p3) {
return (p2.x - p1.x) * (p3.y - p1.y) - (p3.x - p1.x) * (p2.y - p1.y);
}