[][src]Struct vec_arith::Vec2

pub struct Vec2<T>(_, _);

Methods

impl Vec2<f32>
[src]

pub fn abs(self) -> Self
[src]

pub fn powf(self, rhs: Self) -> Self
[src]

pub fn powi(self, rhs: Vec2<i32>) -> Self
[src]

pub fn sqrt(self) -> Self
[src]

pub fn cbrt(self) -> Self
[src]

pub fn log(self, rhs: Self) -> Self
[src]

pub fn len(self) -> f32
[src]

pub fn normalize(self, len: f32) -> Self
[src]

pub fn distance(self, other: Self) -> f32
[src]

pub fn angle(self, other: Self) -> f32
[src]

impl Vec2<f64>
[src]

pub fn abs(self) -> Self
[src]

pub fn powf(self, rhs: Self) -> Self
[src]

pub fn powi(self, rhs: Vec2<i32>) -> Self
[src]

pub fn sqrt(self) -> Self
[src]

pub fn cbrt(self) -> Self
[src]

pub fn log(self, rhs: Self) -> Self
[src]

pub fn len(self) -> f64
[src]

pub fn normalize(self, len: f64) -> Self
[src]

pub fn distance(self, other: Self) -> f64
[src]

pub fn angle(self, other: Self) -> f64
[src]

impl<T: PartialOrd + Copy> Vec2<T>
[src]

pub fn min(self, other: Self) -> Self
[src]

pub fn mins(self, other: T) -> Self
[src]

pub fn max(self, other: Self) -> Self
[src]

pub fn maxs(self, other: T) -> Self
[src]

pub fn clamp(self, lower: Self, upper: Self) -> Self
[src]

pub fn clamps(self, lower: T, upper: T) -> Self
[src]

impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy> Vec2<T>
[src]

pub fn dot(self, other: Self) -> T
[src]

pub fn mix(self, a: Self, b: Self) -> Self
[src]

Trait Implementations

impl<T: Copy> From<T> for Vec2<T>
[src]

impl<T: Copy> From<[T; 2]> for Vec2<T>
[src]

impl<T> From<(T, T)> for Vec2<T>
[src]

impl<T: PartialOrd> PartialOrd<Vec2<T>> for Vec2<T>
[src]

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

impl<T: PartialEq> PartialEq<Vec2<T>> for Vec2<T>
[src]

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl<T: Add<Output = U>, U> Add<Vec2<T>> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the + operator.

impl<T: Sub<Output = U>, U> Sub<Vec2<T>> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the - operator.

impl<T: Mul<Output = U>, U> Mul<Vec2<T>> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the * operator.

impl<T: Mul<Output = U> + Copy, U> Mul<T> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the * operator.

impl<T: Div<Output = U>, U> Div<Vec2<T>> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the / operator.

impl<T: Div<Output = U> + Copy, U> Div<T> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the / operator.

impl<T: Rem<Output = U>, U> Rem<Vec2<T>> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the % operator.

impl<T: Rem<Output = U> + Copy, U> Rem<T> for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the % operator.

impl<T: Neg<Output = U>, U> Neg for Vec2<T>
[src]

type Output = Vec2<U>

The resulting type after applying the - operator.

impl<T: AddAssign> AddAssign<Vec2<T>> for Vec2<T>
[src]

impl<T: SubAssign> SubAssign<Vec2<T>> for Vec2<T>
[src]

impl<T: MulAssign> MulAssign<Vec2<T>> for Vec2<T>
[src]

impl<T: MulAssign + Copy> MulAssign<T> for Vec2<T>
[src]

impl<T: DivAssign> DivAssign<Vec2<T>> for Vec2<T>
[src]

impl<T: DivAssign + Copy> DivAssign<T> for Vec2<T>
[src]

impl<T: RemAssign> RemAssign<Vec2<T>> for Vec2<T>
[src]

impl<T: RemAssign + Copy> RemAssign<T> for Vec2<T>
[src]

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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