[][src]Struct fumarole::math::Vec2

pub struct Vec2<I> {
    pub x: I,
    pub y: I,
}

Fields

x: Iy: I

Methods

impl<I> Vec2<I>[src]

pub fn new(x: I, y: I) -> Vec2<I>[src]

pub fn as_array(self) -> [I; 2][src]

impl Vec2<f32>[src]

pub fn transform(self, transform: Transform) -> Self[src]

impl Vec2<f32>[src]

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

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

pub fn normalize(self) -> Vec2<f32>[src]

pub fn from_radians(angle: f32) -> Vec2<f32>[src]

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

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

impl Vec2<f64>[src]

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

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

pub fn normalize(self) -> Vec2<f64>[src]

pub fn from_radians(angle: f64) -> Vec2<f64>[src]

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

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

Trait Implementations

impl<I> Add<(I, I)> for Vec2<I> where
    I: Add<I> + Copy,
    <I as Add<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the + operator.

impl<I> Add<I> for Vec2<I> where
    I: Add<I> + Copy,
    <I as Add<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the + operator.

impl<I> Add<Vec2<I>> for Vec2<I> where
    I: Add<I> + Copy,
    <I as Add<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the + operator.

impl<I> AddAssign<(I, I)> for Vec2<I> where
    I: AddAssign<I> + Copy
[src]

impl<I> AddAssign<I> for Vec2<I> where
    I: AddAssign<I> + Copy
[src]

impl<I> AddAssign<Vec2<I>> for Vec2<I> where
    I: AddAssign<I> + Copy
[src]

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

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

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

impl<I: Default> Default for Vec2<I>[src]

impl<'de, I> Deserialize<'de> for Vec2<I> where
    I: Deserialize<'de>, 
[src]

impl<I> Div<(I, I)> for Vec2<I> where
    I: Div<I> + Copy,
    <I as Div<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the / operator.

impl<I> Div<I> for Vec2<I> where
    I: Div<I> + Copy,
    <I as Div<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the / operator.

impl<I> Div<Vec2<I>> for Vec2<I> where
    I: Div<I> + Copy,
    <I as Div<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the / operator.

impl<I> DivAssign<(I, I)> for Vec2<I> where
    I: DivAssign<I> + Copy
[src]

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

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

impl<I: Eq> Eq for Vec2<I>[src]

impl<I: Hash> Hash for Vec2<I>[src]

impl<I> Into<[I; 2]> for Vec2<I>[src]

impl<I> Mul<(I, I)> for Vec2<I> where
    I: Mul<I> + Copy,
    <I as Mul<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the * operator.

impl<I> Mul<I> for Vec2<I> where
    I: Mul<I> + Copy,
    <I as Mul<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the * operator.

impl<I> Mul<Mat2<I>> for Vec2<I> where
    I: Add<I> + Mul<I> + Copy,
    <I as Mul<I>>::Output: Into<I>,
    <I as Add<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the * operator.

impl<I> Mul<Vec2<I>> for Vec2<I> where
    I: Mul<I> + Copy,
    <I as Mul<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the * operator.

impl<I> Mul<Vec2<I>> for Mat2<I> where
    I: Add<I> + Mul<I> + Copy,
    <I as Mul<I>>::Output: Into<I>,
    <I as Add<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the * operator.

impl<I> MulAssign<(I, I)> for Vec2<I> where
    I: MulAssign<I> + Copy
[src]

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

impl<I> MulAssign<Mat2<I>> for Vec2<I> where
    Vec2<I>: Mul<Mat2<I>> + Clone,
    <Vec2<I> as Mul<Mat2<I>>>::Output: Into<Vec2<I>>, 
[src]

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

impl<I> Neg for Vec2<I> where
    I: Neg
[src]

type Output = Vec2<<I as Neg>::Output>

The resulting type after applying the - operator.

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

impl<I> Serialize for Vec2<I> where
    I: Serialize
[src]

impl<I> StructuralEq for Vec2<I>[src]

impl<I> StructuralPartialEq for Vec2<I>[src]

impl<I> Sub<(I, I)> for Vec2<I> where
    I: Sub<I> + Copy,
    <I as Sub<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the - operator.

impl<I> Sub<I> for Vec2<I> where
    I: Sub<I> + Copy,
    <I as Sub<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the - operator.

impl<I> Sub<Vec2<I>> for Vec2<I> where
    I: Sub<I> + Copy,
    <I as Sub<I>>::Output: Into<I>, 
[src]

type Output = Vec2<I>

The resulting type after applying the - operator.

impl<I> SubAssign<(I, I)> for Vec2<I> where
    I: SubAssign<I> + Copy
[src]

impl<I> SubAssign<I> for Vec2<I> where
    I: SubAssign<I> + Copy
[src]

impl<I> SubAssign<Vec2<I>> for Vec2<I> where
    I: SubAssign<I> + Copy
[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for Vec2<I> where
    I: RefUnwindSafe

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

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

impl<I> Unpin for Vec2<I> where
    I: Unpin

impl<I> UnwindSafe for Vec2<I> where
    I: UnwindSafe

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> Content for T where
    T: Copy
[src]

type Owned = T

A type that holds a sized version of the content.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> SetParameter for T

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

type Owned = T

The resulting type after obtaining ownership.

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.