pub enum CCW {
ONLINE_BACK,
COUNTER_CLOCKWISE,
ON_SEGMENT,
CLOCKWISE,
ONLINE_FRONT,
}
Expand description
点と線分の位置関係
Variants§
ONLINE_BACK
点が線分と同一直線上にあり、かつ、点が線分の方向に対して後ろにある。
COUNTER_CLOCKWISE
点が線分に対して、半時計回り方向にある(左側)。
ON_SEGMENT
点が線分上にある。
CLOCKWISE
点が線分に対して、時計回り方向にある(右側)。
ONLINE_FRONT
点が線分と同一直線上にあり、かつ、点が線分の方向に対して前にある。
Implementations§
Source§impl CCW
impl CCW
Sourcepub fn online_back(self) -> bool
pub fn online_back(self) -> bool
ONLINE_BACK
ならばtrue
を返す。
Sourcepub fn counter_clockwise(self) -> bool
pub fn counter_clockwise(self) -> bool
COUNTER_CLOCKWISE
ならばtrue
を返す。
Sourcepub fn on_segment(self) -> bool
pub fn on_segment(self) -> bool
ON_SEGMENT
ならばtrue
を返す。
Sourcepub fn online_front(self) -> bool
pub fn online_front(self) -> bool
ONLINE_FRONT
ならばtrue
を返す。
Trait Implementations§
impl Copy for CCW
impl StructuralPartialEq for CCW
Auto Trait Implementations§
impl Freeze for CCW
impl RefUnwindSafe for CCW
impl Send for CCW
impl Sync for CCW
impl Unpin for CCW
impl UnwindSafe for CCW
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