[][src]Struct glam::f32::Vec2

#[repr(C)]
pub struct Vec2(_, _);

A 2-dimensional vector.

Methods

impl Vec2[src]

pub fn zero() -> Vec2[src]

pub fn one() -> Vec2[src]

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

pub fn unit_x() -> Vec2[src]

pub fn unit_y() -> Vec2[src]

pub fn splat(v: f32) -> Vec2[src]

pub fn extend(self, z: f32) -> Vec3[src]

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

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

pub fn set_x(&mut self, x: f32)[src]

pub fn set_y(&mut self, y: f32)[src]

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

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

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

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

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

pub fn min(self, rhs: Vec2) -> Vec2[src]

pub fn max(self, rhs: Vec2) -> Vec2[src]

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

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

pub fn cmpeq(self, rhs: Vec2) -> Vec2Mask[src]

pub fn cmpne(self, rhs: Vec2) -> Vec2Mask[src]

pub fn cmpge(self, rhs: Vec2) -> Vec2Mask[src]

pub fn cmpgt(self, rhs: Vec2) -> Vec2Mask[src]

pub fn cmple(self, rhs: Vec2) -> Vec2Mask[src]

pub fn cmplt(self, rhs: Vec2) -> Vec2Mask[src]

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

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

pub fn lerp(self, rhs: Self, s: f32) -> Self[src]

pub fn is_normalized(self) -> bool[src]

Trait Implementations

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

impl Default for Vec2[src]

impl Clone for Vec2[src]

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

impl PartialOrd<Vec2> for Vec2[src]

impl PartialEq<Vec2> for Vec2[src]

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

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

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

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

impl Copy for Vec2[src]

impl Add<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the + operator.

impl Sub<Vec2> for Vec2[src]

type Output = Self

The resulting type after applying the - operator.

impl Mul<Vec2> for Mat2[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 Mul<Vec2> for f32[src]

type Output = Vec2

The resulting type after applying the * operator.

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 Neg for Vec2[src]

type Output = Self

The resulting type after applying the - operator.

impl AddAssign<Vec2> for Vec2[src]

impl SubAssign<Vec2> for Vec2[src]

impl MulAssign<Vec2> for Vec2[src]

impl MulAssign<f32> for Vec2[src]

impl DivAssign<Vec2> for Vec2[src]

impl DivAssign<f32> for Vec2[src]

impl Debug for Vec2[src]

impl Display for Vec2[src]

impl Distribution<Vec2> for Standard[src]

impl AbsDiffEq<Vec2> for Vec2[src]

type Epsilon = <f32 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.

impl RelativeEq<Vec2> for Vec2[src]

impl UlpsEq<Vec2> for Vec2[src]

Auto Trait Implementations

impl Send for Vec2

impl Unpin for Vec2

impl Sync for Vec2

impl UnwindSafe for Vec2

impl RefUnwindSafe for Vec2

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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

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

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

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