pub struct Point2D { /* private fields */ }
Implementations§
Source§impl Point2D
impl Point2D
pub fn new(x: f64, y: f64) -> Self
pub fn origin() -> Self
pub fn x(&self) -> f64
pub fn y(&self) -> f64
pub fn add(&self, v: &Vector2D) -> Self
pub fn sub(&self, p0: &Point2D) -> Vector2D
pub fn to_vec(&self) -> Vector2D
pub fn distance_to(&self, p: &Point2D) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Point2D
impl RefUnwindSafe for Point2D
impl Send for Point2D
impl Sync for Point2D
impl Unpin for Point2D
impl UnwindSafe for Point2D
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