Struct nannou::ui::text::rt::Vector[]

pub struct Vector<N> {
    pub x: N,
    pub y: N,
}

A vector in 2-dimensional space, with each dimension of type N.

Legal operations on vectors are addition and subtraction by vectors, addition by points (to give points), and multiplication and division by scalars.

Fields

Trait Implementations

impl<N> Add<Point<N>> for Vector<N> where
    N: Add<N, Output = N>, 

The resulting type after applying the + operator.

Performs the + operation.

impl<N> Add<Vector<N>> for Point<N> where
    N: Add<N, Output = N>, 

The resulting type after applying the + operator.

Performs the + operation.

impl<N> Add<Vector<N>> for Vector<N> where
    N: Add<N, Output = N>, 

The resulting type after applying the + operator.

Performs the + operation.

impl<N> PartialOrd<Vector<N>> for Vector<N> where
    N: PartialOrd<N>, 

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<N> Hash for Vector<N> where
    N: Hash

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<N> Sub<Vector<N>> for Point<N> where
    N: Sub<N, Output = N>, 

The resulting type after applying the - operator.

Performs the - operation.

impl<N> Sub<Vector<N>> for Vector<N> where
    N: Sub<N, Output = N>, 

The resulting type after applying the - operator.

Performs the - operation.

impl<N> Clone for Vector<N> where
    N: Clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N> Debug for Vector<N> where
    N: Debug

Formats the value using the given formatter. Read more

impl Mul<f64> for Vector<f64>

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector<f64>> for f64

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<f32> for Vector<f32>

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector<f32>> for f32

The resulting type after applying the * operator.

Performs the * operation.

impl<N> Copy for Vector<N> where
    N: Copy

impl<N> Ord for Vector<N> where
    N: Ord

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<N> Eq for Vector<N> where
    N: Eq

impl<N> PartialEq<Vector<N>> for Vector<N> where
    N: PartialEq<N>, 

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

This method tests for !=.

impl Div<Vector<f32>> for f32

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector<f64>> for f64

The resulting type after applying the / operator.

Performs the / operation.

impl Div<f64> for Vector<f64>

The resulting type after applying the / operator.

Performs the / operation.

impl Div<f32> for Vector<f32>

The resulting type after applying the / operator.

Performs the / operation.

Auto Trait Implementations

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

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