[][src]Struct oxygengine_composite_renderer::math::Vec2

pub struct Vec2 {
    pub x: Scalar,
    pub y: Scalar,
}

Fields

x: Scalary: Scalar

Implementations

impl Vec2[src]

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

pub fn zero() -> Self[src]

pub fn one() -> Self[src]

pub fn sqr_magnitude(self) -> Scalar[src]

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

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

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

pub fn lerp(self, other: Vec2, factor: Scalar) -> Self[src]

pub fn lerp_clamped(self, other: Vec2, factor: Scalar) -> Self[src]

pub fn project_distance(self, from: Vec2, to: Vec2) -> Scalar[src]

pub fn project(self, from: Vec2, to: Vec2) -> Vec2[src]

Trait Implementations

impl Add<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<f32> for Vec2[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Vec2[src]

impl Copy for Vec2[src]

impl Debug for Vec2[src]

impl Default for Vec2[src]

impl<'de> Deserialize<'de> for Vec2[src]

impl Div<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<f32> for Vec2[src]

type Output = Self

The resulting type after applying the / operator.

impl From<[f32; 2]> for Vec2[src]

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

impl From<f32> for Vec2[src]

impl Mul<Mat2d> for Vec2[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Vec2> for Mat2d[src]

type Output = Vec2

The resulting type after applying the * operator.

impl Mul<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32> for Vec2[src]

type Output = Self

The resulting type after applying the * operator.

impl Neg for Vec2[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Vec2> for Vec2[src]

impl Serialize for Vec2[src]

impl StructuralPartialEq for Vec2[src]

impl Sub<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<f32> for Vec2[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Vec2

impl Send for Vec2

impl Sync for Vec2

impl Unpin for Vec2

impl UnwindSafe for Vec2

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource for T where
    T: Any, 

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryDefault for T where
    T: Default

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,