pub struct VisionVector {
pub x: f64,
pub y: f64,
}Expand description
A two-dimensional Vision vector (VNVector).
Fields§
§x: f64§y: f64Implementations§
Source§impl VisionVector
impl VisionVector
pub const fn new(x: f64, y: f64) -> Self
pub const fn zero() -> Self
pub fn from_points(head: VisionPoint, tail: VisionPoint) -> Self
pub fn unit(self) -> Self
pub fn multiply(self, scalar: f64) -> Self
pub fn add(self, other: Self) -> Self
pub fn subtract(self, other: Self) -> Self
pub fn dot(self, other: Self) -> f64
pub fn r(self) -> f64
pub fn theta(self) -> f64
pub fn length(self) -> f64
pub fn squared_length(self) -> f64
Trait Implementations§
Source§impl Clone for VisionVector
impl Clone for VisionVector
Source§fn clone(&self) -> VisionVector
fn clone(&self) -> VisionVector
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 VisionVector
impl Debug for VisionVector
Source§impl PartialEq for VisionVector
impl PartialEq for VisionVector
Source§fn eq(&self, other: &VisionVector) -> bool
fn eq(&self, other: &VisionVector) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for VisionVector
impl StructuralPartialEq for VisionVector
Auto Trait Implementations§
impl Freeze for VisionVector
impl RefUnwindSafe for VisionVector
impl Send for VisionVector
impl Sync for VisionVector
impl Unpin for VisionVector
impl UnsafeUnpin for VisionVector
impl UnwindSafe for VisionVector
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