Orientation is notoriously subject to numerical precision errors in the case of collinear or nearly collinear points. JTS uses extended-precision arithmetic to increase the robustness of the computation.
q relative to a directed infinite line specified by
p1-p2. The index indicates whether the point lies to the
LEFT or
RIGHT of the line, or lies on it
COLLINEAR. The index also indicates the orientation of the triangle formed by the three points (
COUNTERCLOCKWISE,
CLOCKWISE, or
STRAIGHT )