Expand description
§use-orientation
Small 2D winding and collinearity helpers for the RustUse geometry workspace.
§Example
use use_orientation::{Orientation2, orientation_2d};
use use_point::Point2;
assert_eq!(
orientation_2d(
Point2::new(0.0, 0.0),
Point2::new(4.0, 0.0),
Point2::new(0.0, 3.0),
),
Orientation2::CounterClockwise,
);Enums§
- Orientation2
- The winding order of three 2D points.
Functions§
- orientation_
2d - Returns the winding order of three 2D points.
- orientation_
2d_ with_ tolerance - Returns the winding order of three 2D points using an explicit area tolerance.
- signed_
twice_ area_ 2d - Returns twice the signed area of the triangle formed by three 2D points.
- try_
orientation_ 2d - Returns the winding order of three 2D points with finite coordinates.
- try_
orientation_ 2d_ with_ tolerance - Returns the winding order of three finite 2D points using an explicit area tolerance.