code: private static int parity(Point2d a, Point2d b, Point2d c) {
          double det = (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);
          return (int) Math.signum(det);
      }
docs: Determine the parity of the triangle formed by the 3 coordinates a, b and
  c.
  
  @param a point 1
  @param b point 2
  @param c point 3
  @return the parity of the triangle formed by 3 points