Trait Vector

Source
pub trait Vector: Sized + Div<f32, Output = Self> {
Show 28 methods // Required methods fn zero() -> Self; fn one() -> Self; fn infinity() -> Self; fn nan() -> Self; fn epsilon() -> Self; fn replicate(value: f32) -> Self; fn is_nan(&self) -> bool; fn is_infinite(&self) -> bool; fn dot(&self, other: &Self) -> f32; fn swizzle(&self, e0: usize, e1: usize, e2: usize, e3: usize) -> Self; fn permute( &self, other: &Self, permute_x: usize, permute_y: usize, permute_w: usize, permute_z: usize, ) -> Self; fn transform(&self, matrix: &Matrix) -> Self; fn min(&self, other: &Self) -> Self; fn max(&self, other: &Self) -> Self; fn round(&self) -> Self; fn trunc(&self) -> Self; fn floor(&self) -> Self; fn ceil(&self) -> Self; fn clamp(&self, min: &Self, max: &Self) -> Self; fn multiply_add(&self, mul: &Self, add: &Self) -> Self; fn splat_x(&self) -> Self; fn splat_y(&self) -> Self; fn splat_z(&self) -> Self; fn splat_w(&self) -> Self; // Provided methods fn is_finite(&self) -> bool { ... } fn length_sq(&self) -> f32 { ... } fn length(&self) -> f32 { ... } fn normalize(self) -> Self { ... }
}

Required Methods§

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn infinity() -> Self

Source

fn nan() -> Self

Source

fn epsilon() -> Self

Source

fn replicate(value: f32) -> Self

Source

fn is_nan(&self) -> bool

Source

fn is_infinite(&self) -> bool

Source

fn dot(&self, other: &Self) -> f32

Source

fn swizzle(&self, e0: usize, e1: usize, e2: usize, e3: usize) -> Self

Source

fn permute( &self, other: &Self, permute_x: usize, permute_y: usize, permute_w: usize, permute_z: usize, ) -> Self

Source

fn transform(&self, matrix: &Matrix) -> Self

Source

fn min(&self, other: &Self) -> Self

Source

fn max(&self, other: &Self) -> Self

Source

fn round(&self) -> Self

Source

fn trunc(&self) -> Self

Source

fn floor(&self) -> Self

Source

fn ceil(&self) -> Self

Source

fn clamp(&self, min: &Self, max: &Self) -> Self

Source

fn multiply_add(&self, mul: &Self, add: &Self) -> Self

Source

fn splat_x(&self) -> Self

Source

fn splat_y(&self) -> Self

Source

fn splat_z(&self) -> Self

Source

fn splat_w(&self) -> Self

Provided Methods§

Source

fn is_finite(&self) -> bool

Source

fn length_sq(&self) -> f32

Source

fn length(&self) -> f32

Source

fn normalize(self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§