collinear2 function

int collinear2(
  1. Point a,
  2. Point b,
  3. Point c
)

Implementation

int collinear2(Point a, Point b, Point c) {
  num area = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
  if (area.abs() < eps) return 0;
  return area.sign.toInt();
}