#[repr(C)]pub struct VisionPoint {
pub x: f64,
pub y: f64,
}Expand description
A two-dimensional Vision point (VNPoint).
Fields§
§x: f64§y: f64Implementations§
Source§impl VisionPoint
impl VisionPoint
pub const fn new(x: f64, y: f64) -> Self
pub const fn zero() -> Self
pub fn apply_vector(self, vector: VisionVector) -> Self
pub fn distance_to(self, point: Self) -> f64
Trait Implementations§
Source§impl Clone for VisionPoint
impl Clone for VisionPoint
Source§fn clone(&self) -> VisionPoint
fn clone(&self) -> VisionPoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VisionPoint
impl Debug for VisionPoint
Source§impl PartialEq for VisionPoint
impl PartialEq for VisionPoint
Source§fn eq(&self, other: &VisionPoint) -> bool
fn eq(&self, other: &VisionPoint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for VisionPoint
impl StructuralPartialEq for VisionPoint
Auto Trait Implementations§
impl Freeze for VisionPoint
impl RefUnwindSafe for VisionPoint
impl Send for VisionPoint
impl Sync for VisionPoint
impl Unpin for VisionPoint
impl UnsafeUnpin for VisionPoint
impl UnwindSafe for VisionPoint
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