Vec4

Type Alias Vec4 

Source
pub type Vec4 = Vector4<f32>;

Aliased Type§

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

Fields§

§x: f32§y: f32§z: f32§w: f32

Implementations§

Source§

impl Vec4

Source

pub fn zero() -> Vec4

Source

pub fn from_array(data: [f32; 4]) -> Vec4

Source

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

Source

pub fn len(&self) -> f32

Source

pub fn cross(&self, other: &Self) -> Self

Source

pub fn normalize(&self) -> Self

Source

pub fn apply_matrix(&mut self, matrix: Mat4)

Trait Implementations§