pub enum Side {
Positive,
Negative,
}
Expand description
The positive or negative side of a vector or segment.
Given a reference vector v0
, a vector v1
is on the positive side
if the sign of the cross product v0 x v1
is positive.
This type does not use the left/right terminology to avoid confusion with left-handed / right-handed coordinate systems. Right-handed coordinate systems seem to be what a lot of people are most familiar with (especially in 2D), however most vector graphics specifications use y-down left-handed coordinate systems. Unfortunately mirroring the y axis inverts the meaning of “left” and “right”, which causes confusion. In practice:
- In a y-down left-handed coordinate system such as
SVG
’s,Side::Positive
is the right side. - In a y-up right-handed coordinate system,
Side::Positive
is the left side.
Variants§
Implementations§
Trait Implementations§
impl Copy for Side
impl StructuralPartialEq for Side
Auto Trait Implementations§
impl Freeze for Side
impl RefUnwindSafe for Side
impl Send for Side
impl Sync for Side
impl Unpin for Side
impl UnwindSafe for Side
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)