Struct rla::vector::Vector [] [src]

pub struct Vector<T: Float, N: ArrayLength<T>> where
    N::ArrayType: Copy
{ pub data: GenericArray<T, N>, }

Fields

Methods

impl<T, N: ArrayLength<T>> Vector<T, N> where
    T: Float + Zero,
    N::ArrayType: Copy,
    Vector<T, N>: Copy
[src]

Builds a Vector from a Vector with an additional value.

Example

use rla::vector::*;
let v = Vec3f::from_one_less(Vec2f::new(&[1.0, 2.0]), 3.0);
assert!(v == Vec3f::new(&[1.0, 2.0, 3.0]));

Trait Implementations

impl<T: PartialEq + Float, N: PartialEq + ArrayLength<T>> PartialEq for Vector<T, N> where
    N::ArrayType: 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 + Float, N: Eq + ArrayLength<T>> Eq for Vector<T, N> where
    N::ArrayType: Copy
[src]

impl<T: Copy + Float, N: Copy + ArrayLength<T>> Copy for Vector<T, N> where
    N::ArrayType: Copy
[src]

impl<T: Debug + Float, N: Debug + ArrayLength<T>> Debug for Vector<T, N> where
    N::ArrayType: Copy
[src]

Formats the value using the given formatter.

impl<T, N> Clone for Vector<T, N> where
    N: ArrayLength<T>,
    N::ArrayType: Copy,
    T: Float
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T, N> Sub for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the - operator

The method for the - operator

impl<T, N> Add for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the + operator

The method for the + operator

impl<T, N> Mul for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T, N> Div for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T, N> Mul<T> for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T, N> Add<T> for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the + operator

The method for the + operator

impl<T, N> Sub<T> for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the - operator

The method for the - operator

impl<T, N> Div<T> for Vector<T, N> where
    N::ArrayType: Copy,
    N: ArrayLength<T>,
    T: Float
[src]

The resulting type after applying the / operator

The method for the / operator