Struct radiant_rs::Vec3
[−]
[src]
pub struct Vec3<T: Debug + Float = f32>(pub T, pub T, pub T);
A 3-dimensional vector.
Methods
impl<T> Vec3<T> where T: Debug + Float
[src]
fn new() -> Vec3<T>
Creates a new instances.
fn len(&self) -> T
Returns the length of the vector
fn dot(&self, other: &Vec3<T>) -> T
Returns the dot-product of the vectors.
Trait Implementations
impl<T: Copy + Debug + Float> Copy for Vec3<T>
[src]
impl<T: Clone + Debug + Float> Clone for Vec3<T>
[src]
fn clone(&self) -> Vec3<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T> VecType<T> for Vec3<T> where T: Debug + Float
[src]
impl<T> From<(T, T, T)> for Vec3<T> where T: Debug + Float
[src]
impl<T> From<[T; 3]> for Vec3<T> where T: Debug + Float
[src]
impl<T> Neg for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the -
operator
fn neg(self) -> Vec3<T>
The method for the unary -
operator
impl<T> Add for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the +
operator
fn add(self, other: Vec3<T>) -> Vec3<T>
The method for the +
operator
impl<T> AddAssign for Vec3<T> where T: Debug + Float
[src]
fn add_assign(&mut self, other: Vec3<T>)
The method for the +=
operator
impl<T> Sub for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the -
operator
fn sub(self, other: Vec3<T>) -> Vec3<T>
The method for the -
operator
impl<T> SubAssign for Vec3<T> where T: Debug + Float
[src]
fn sub_assign(&mut self, other: Vec3<T>)
The method for the -=
operator
impl<T> Mul<Vec3<T>> for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the *
operator
fn mul(self, other: Vec3<T>) -> Vec3<T>
Multiplies individual vector components with those of the given vector.
impl<T> MulAssign<Vec3<T>> for Vec3<T> where T: Debug + Float
[src]
fn mul_assign(&mut self, other: Vec3<T>)
Mutates the vector by multiplying its components with those of the given vector.
impl<T> Mul<T> for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the *
operator
fn mul(self, other: T) -> Vec3<T>
Multiplies the vector with given scalar operand.
impl<T> MulAssign<T> for Vec3<T> where T: Debug + Float
[src]
fn mul_assign(&mut self, other: T)
Mutates the vector by multiplying it with the scalar operand.
impl<T> Div<Vec3<T>> for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the /
operator
fn div(self, other: Vec3<T>) -> Vec3<T>
Divides individual vector components with those of the given vector.
impl<T> DivAssign<Vec3<T>> for Vec3<T> where T: Debug + Float
[src]
fn div_assign(&mut self, other: Vec3<T>)
Mutates the vector by dividing its components with those of the given vector.
impl<T> Div<T> for Vec3<T> where T: Debug + Float
[src]
type Output = Vec3<T>
The resulting type after applying the /
operator
fn div(self, other: T) -> Vec3<T>
Divides the vector by given scalar operand.
impl<T> DivAssign<T> for Vec3<T> where T: Debug + Float
[src]
fn div_assign(&mut self, other: T)
Mutates the vector by dividing it by given scalar.