Struct eschers::vector::Vector [] [src]

pub struct Vector<T> where
    T: Clone + Copy
{ pub x: T, pub y: T, }

Representation of two dimensional vector

Fields

x-coordinate of the vector

y-coordinate of the vector

Methods

impl<T> Vector<T> where
    T: Copy + Add<Output = T> + Neg<Output = T> + Mul<Output = T>, 
[src]

Create a Vector with Cartesian coordinates x and y

Add other component-wise to self, returning a new Vector

Negate self component-wise, returning a new Vector

Subtract other component-wise from self, returning a new Vector

Scale self uniformly by factor, returning a new Vector

impl Vector<f64>
[src]

Calculate the length of a Vector<f64>

Trait Implementations

impl<T: Debug> Debug for Vector<T> where
    T: Clone + Copy
[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq> PartialEq for Vector<T> where
    T: Clone + Copy
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq> Eq for Vector<T> where
    T: Clone + Copy
[src]

impl<T: Clone> Clone for Vector<T> where
    T: Clone + Copy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Vector<T> where
    T: Clone + Copy
[src]

Auto Trait Implementations

impl<T> Send for Vector<T> where
    T: Send

impl<T> Sync for Vector<T> where
    T: Sync