Vector3

Type Alias Vector3 

Source
pub type Vector3<T> = Vector<T, 3>;

Aliased Type§

pub struct Vector3<T> {
    pub data: [T; 3],
}

Fields§

§data: [T; 3]

Implementations§

Source§

impl<T: Clone> Vector3<T>

Source

pub fn new(x: T, y: T, z: T) -> Self

Source

pub fn x(&self) -> T

Source

pub fn y(&self) -> T

Source

pub fn z(&self) -> T

Source§

impl<T: Mul<Output = T> + Sub<Output = T> + Clone> Vector3<T>

Source

pub fn cross(&self, rhs: &Vector3<T>) -> Vector3<T>