pub struct Point2 { /* private fields */ }Expand description
A two-dimensional point.
Implementations§
Source§impl Point2
impl Point2
Sourcepub fn from_values<X, Y>(x: X, y: Y) -> Self
pub fn from_values<X, Y>(x: X, y: Y) -> Self
Constructs a point from values convertible into Real coordinates.
Sourcepub fn delta_from(&self, other: &Self) -> (Real, Real)
pub fn delta_from(&self, other: &Self) -> (Real, Real)
Returns self - other as a coordinate pair.
Sourcepub fn distance_squared(&self, other: &Self) -> Real
pub fn distance_squared(&self, other: &Self) -> Real
Returns squared Euclidean distance to another point.
Sourcepub fn translated(&self, dx: Real, dy: Real) -> Self
pub fn translated(&self, dx: Real, dy: Real) -> Self
Translates the point by the given Real delta.
Sourcepub fn structural_facts(&self) -> Point2Facts
pub fn structural_facts(&self) -> Point2Facts
Returns conservative structural facts for this point’s coordinates.
The facts expose exact-rational schedule eligibility and symbolic dependency families without exposing scalar internals. They are intended for object-level dispatch in the style described by Yap, “Towards Exact Geometric Computation,” Computational Geometry 7.1-2 (1997).
Source§impl Point2
impl Point2
Sourcepub fn transform_similarity(&self, transform: &Similarity2) -> Self
pub fn transform_similarity(&self, transform: &Similarity2) -> Self
Applies a certified planar similarity transform.
Trait Implementations§
impl StructuralPartialEq for Point2
Auto Trait Implementations§
impl !Freeze for Point2
impl !RefUnwindSafe for Point2
impl !Sync for Point2
impl Send for Point2
impl Unpin for Point2
impl UnsafeUnpin for Point2
impl UnwindSafe for Point2
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