Struct newport_math::vec2::Vector2[][src]

pub struct Vector2 {
    pub x: f32,
    pub y: f32,
}

Fields

x: f32y: f32

Implementations

impl Vector2[src]

pub const ZERO: Self[src]

pub const RIGHT: Self[src]

pub const UP: Self[src]

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

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

pub const fn cross(self, rhs: Self) -> f32[src]

pub const fn perp(self) -> Self[src]

pub const fn len_sq(self) -> f32[src]

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

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

pub const fn is_finite(self) -> bool[src]

pub const fn is_nan(self) -> bool[src]

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

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

pub const fn min_elem(self) -> f32[src]

pub const fn max_elem(self) -> f32[src]

Trait Implementations

impl Add<Vector2> for Vector2[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<f32> for Vector2[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Vector2> for Vector2[src]

impl AddAssign<f32> for Vector2[src]

impl Clone for Vector2[src]

impl Copy for Vector2[src]

impl Debug for Vector2[src]

impl Default for Vector2[src]

impl Div<Vector2> for Vector2[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<f32> for Vector2[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<Vector2> for Vector2[src]

impl DivAssign<f32> for Vector2[src]

impl Mul<Vector2> for Vector2[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32> for Vector2[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<Vector2> for Vector2[src]

impl MulAssign<f32> for Vector2[src]

impl Neg for Vector2[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Vector2> for Vector2[src]

impl PartialOrd<Vector2> for Vector2[src]

impl StructuralPartialEq for Vector2[src]

impl Sub<Vector2> for Vector2[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<f32> for Vector2[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector2> for Vector2[src]

impl SubAssign<f32> for Vector2[src]

Auto Trait Implementations

impl Send for Vector2

impl Sync for Vector2

impl Unpin for Vector2

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.