Function orient2d

Source
pub fn orient2d(a: DVec2, b: DVec2, c: DVec2) -> Certified
Expand description

Orientation of c relative to the directed line a -> b.

Returns Sign::Positive when a, b, c turn counter-clockwise, Sign::Negative for clockwise, and Sign::Zero when the three points are exactly collinear.

The result is always Certified::Certain: this function escalates to exact arithmetic internally, so it never returns an unproven sign. A caller may therefore use it to drive a topology decision directly.