code: private static int winding(Point2d a, Point2d b, Point2d c) {
          return (int) Math.signum((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x));
      }
docs: Determine the winding of three points using the determinant.
  
  @param a first point
  @param b second point
  @param c third point
  @return < 0 = clockwise, 0 = linear, > 0 anti-clockwise