Enum lyon_tessellation::Side
source · 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.