pub enum Sign {
Positive,
Negative,
Collinear,
}Expand description
The three possible outcomes of the orientation_2d side test.
Mirrors the +1 / 0 / -1 return of Boost’s side_by_triangle
(boost/geometry/strategy/cartesian/side_by_triangle.hpp), named
so call sites read as topology rather than as integers.
Variants§
Positive
r lies to the left of the directed line p → q
(counter-clockwise turn). Boost’s +1, the 'L' case in
test/strategies/spherical_side.cpp.
Negative
r lies to the right of the directed line p → q
(clockwise turn). Boost’s -1, the 'R' case.
Collinear
p, q, r are collinear (or two of them coincide).
Boost’s 0, the '|' case.
Trait Implementations§
impl Copy for Sign
impl Eq for Sign
impl StructuralPartialEq for Sign
Auto Trait Implementations§
impl Freeze for Sign
impl RefUnwindSafe for Sign
impl Send for Sign
impl Sync for Sign
impl Unpin for Sign
impl UnsafeUnpin for Sign
impl UnwindSafe for Sign
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more