Expand description
Numerically robust geometric predicates.
Uses Shewchuk’s adaptive precision floating-point arithmetic
via the robust crate to guarantee correct results even for
near-degenerate geometric configurations.
§Background
Standard floating-point arithmetic can produce incorrect results for geometric predicates when points are nearly collinear or cocircular. This module provides robust alternatives.
§References
- Shewchuk (1997), “Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry” https://www.cs.cmu.edu/~quake/robust.html
Enums§
- Orientation
- Result of an orientation test.
Functions§
- is_ccw
- Checks if a polygon has counter-clockwise winding order.
- is_
convex - Checks if a polygon is convex using robust orientation tests.
- orient2d
- Determines the orientation of three points using exact arithmetic.
- orient2d_
filtered - Fast orientation test with exact fallback.
- orient2d_
raw - Returns the raw orientation determinant (twice the signed area).
- point_
in_ triangle - Checks if a point lies strictly inside a triangle.
- point_
in_ triangle_ inclusive - Checks if a point lies inside or on the boundary of a triangle.