signOfDet2x2DD static method

int signOfDet2x2DD(
  1. DD x1,
  2. DD y1,
  3. DD x2,
  4. DD y2,
)

Computes the sign of the determinant of the 2x2 matrix with the given entries.

@return -1 if the determinant is negative, @return 1 if the determinant is positive, @return 0 if the determinant is 0.

Implementation

static int signOfDet2x2DD(DD x1, DD y1, DD x2, DD y2) {
  DD det = x1.multiplyDD(y2).selfSubtractDD(y1.multiplyDD(x2));
  return det.signum();
}