pub struct Vec2 {
pub x: f64,
pub y: f64,
}Fields§
§x: f64§y: f64Implementations§
Source§impl Vec2
impl Vec2
Sourcepub fn distance_to_segment(self, start: Self, end: Self, guard: f64) -> f64
pub fn distance_to_segment(self, start: Self, end: Self, guard: f64) -> f64
Distance to a segment. guard is the caller’s squared-length threshold.
Sourcepub fn distance_to_segment_squared(self, start: Self, end: Self) -> f64
pub fn distance_to_segment_squared(self, start: Self, end: Self) -> f64
Squared distance, retaining the seed sweep’s projection on zero-length segments.
Trait Implementations§
impl Copy for Vec2
Source§impl<'de> Deserialize<'de> for Vec2
impl<'de> Deserialize<'de> for Vec2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Vec2
impl Freeze for Vec2
impl Move for Vec2
impl RefUnwindSafe for Vec2
impl Send for Vec2
impl Sync for Vec2
impl Unpin for Vec2
impl UnsafeUnpin for Vec2
impl UnwindSafe for Vec2
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