[][src]Struct ezcgmath::vector::Vector4

#[repr(C)]pub struct Vector4 {
    pub x: Scalar,
    pub y: Scalar,
    pub z: Scalar,
    pub w: Scalar,
}

A 4-dimensional vector

Fields

x: Scalary: Scalarz: Scalarw: Scalar

Implementations

impl Vector4[src]

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

Creates a new instance of a Vector4 with values (x, y, z, w).

pub fn dot(&self, rhs: &Vector4) -> Scalar[src]

Returns the dot product of the vector with the vector 'rhs'.

Trait Implementations

impl AbsDiffEq<Vector4> for Vector4[src]

type Epsilon = Scalar

Used for specifying relative comparisons.

impl Add<Vector4> for Vector4[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Vector4> for Vector4[src]

impl Clone for Vector4[src]

impl Copy for Vector4[src]

impl Debug for Vector4[src]

impl Default for Vector4[src]

impl Div<f32> for Vector4[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<f32> for Vector4[src]

impl From<Vector3> for Vector4[src]

impl From<Vector4> for Vector3[src]

impl Mul<Matrix4x4> for Vector4[src]

type Output = Vector4

The resulting type after applying the * operator.

impl Mul<f32> for Vector4[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<Matrix4x4> for Vector4[src]

impl MulAssign<f32> for Vector4[src]

impl Neg for Vector4[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Vector4> for Vector4[src]

impl RelativeEq<Vector4> for Vector4[src]

impl StructuralPartialEq for Vector4[src]

impl Sub<Vector4> for Vector4[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector4> for Vector4[src]

impl UlpsEq<Vector4> for Vector4[src]

Auto Trait Implementations

impl RefUnwindSafe for Vector4

impl Send for Vector4

impl Sync for Vector4

impl Unpin for Vector4

impl UnwindSafe for Vector4

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> 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.