[][src]Struct rs_math3d::vector::Vector2

#[repr(C)]pub struct Vector2<T> {
    pub x: T,
    pub y: T,
}

Fields

x: Ty: T

Implementations

impl<T: Scalar> Vector2<T>[src]

pub fn new(x: T, y: T) -> Self[src]

pub fn zero() -> Self[src]

pub fn length(&self) -> T[src]

pub fn dot(l: &Self, r: &Self) -> T[src]

pub fn addVV(l: &Self, r: &Self) -> Self[src]

pub fn subVV(l: &Self, r: &Self) -> Self[src]

pub fn mulVV(l: &Self, r: &Self) -> Self[src]

pub fn divVV(l: &Self, r: &Self) -> Self[src]

pub fn mulVF(l: &Self, r: T) -> Self[src]

pub fn divVF(l: &Self, r: T) -> Self[src]

pub fn remVV(l: &Self, r: &Self) -> Self[src]

pub fn normalize(v: &Self) -> Self[src]

pub fn distance(l: &Self, r: &Self) -> T[src]

pub fn min(l: &Self, r: &Self) -> Self[src]

pub fn max(l: &Self, r: &Self) -> Self[src]

Trait Implementations

impl<T> Add<Vector2<T>> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the + operator.

impl<T: Clone> Clone for Vector2<T>[src]

impl<T: Copy> Copy for Vector2<T>[src]

impl<T: Debug> Debug for Vector2<T>[src]

impl<T> Div<T> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the / operator.

impl<T> Div<Vector2<T>> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the / operator.

impl<T: Scalar> Mul<Matrix2<T>> for Vector2<T>[src]

type Output = Vector2<T>

The resulting type after applying the * operator.

impl<T> Mul<T> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the * operator.

impl<T> Mul<Vector2<T>> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the * operator.

impl<T: Scalar> Mul<Vector2<T>> for Matrix2<T>[src]

type Output = Vector2<T>

The resulting type after applying the * operator.

impl Mul<Vector2<f32>> for f32[src]

type Output = Vector2<f32>

The resulting type after applying the * operator.

impl Mul<Vector2<f64>> for f64[src]

type Output = Vector2<f64>

The resulting type after applying the * operator.

impl Mul<Vector2<i32>> for i32[src]

type Output = Vector2<i32>

The resulting type after applying the * operator.

impl Mul<Vector2<i64>> for i64[src]

type Output = Vector2<i64>

The resulting type after applying the * operator.

impl<T: Scalar> Neg for Vector2<T>[src]

type Output = Vector2<T>

The resulting type after applying the - operator.

impl<T> Rem<T> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the % operator.

impl<T> Rem<Vector2<T>> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the % operator.

impl<T> Sub<Vector2<T>> for Vector2<T> where
    T: Scalar
[src]

type Output = Vector2<T>

The resulting type after applying the - operator.

Auto Trait Implementations

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

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

impl<T> Unpin for Vector2<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.