signedArea method

double signedArea()

Computes the signed 2D area of this triangle. The area value is positive if the triangle is oriented CW, and negative if it is oriented CCW.

The signed area value can be used to determine point orientation, but the implementation in this method is susceptible to round-off errors. Use {@link Orientation#index(Coordinate, Coordinate, Coordinate)} for robust orientation calculation.

@return the signed 2D area of this triangle

@see Orientation#index(Coordinate, Coordinate, Coordinate)

Implementation

double signedArea() {
  return signedAreaStatic(this.p0, this.p1, this.p2);
}