orientation function

double orientation(
  1. Point a,
  2. Point b,
  3. Point c
)

Returns the orientation of three points. 0: collinear, positive: counterclockwise, negative: clockwise.

Implementation

double orientation(Point a, Point b, Point c) {
  return (b - a).cross(c - a);
}