Struct cgmath::Vector4
[−]
[src]
pub struct Vector4<S> { pub x: S, pub y: S, pub z: S, pub w: S, }
Fields
x | |
y | |
z | |
w |
Methods
impl<S> Vector4<S>
impl<S: Copy + Neg<Output=S>> Vector4<S>
fn neg_self(&mut self)
Negate this vector in-place (multiply by -1).
impl<S: NumCast + Copy> Vector4<S>
impl<S: BaseNum> Vector4<S>
Operations specific to numeric four-dimensional vectors.
fn unit_x() -> Vector4<S>
A unit vector in the x
direction.
fn unit_y() -> Vector4<S>
A unit vector in the y
direction.
fn unit_z() -> Vector4<S>
A unit vector in the z
direction.
fn unit_w() -> Vector4<S>
A unit vector in the w
direction.
fn truncate(&self) -> Vector3<S>
Create a Vector3
, dropping the w
value.
fn truncate_n(&self, n: isize) -> Vector3<S>
Create a Vector3
, dropping the nth element