Vec3

Type Alias Vec3 

Source
pub type Vec3 = Vector3<f32>;

Aliased Type§

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

Fields§

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

Implementations§

Source§

impl Vec3

Source

pub fn zero() -> Self

Source

pub fn up() -> Self

Source

pub fn down() -> Self

Source

pub fn front() -> Self

Source

pub fn back() -> Self

Source

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

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 scalar(&self, val: f32) -> Self

Trait Implementations§