#[repr(C)]
pub struct Vector3 {
pub x: f32,
pub y: f32,
pub z: f32,
}
Expand description
Construct new a vector from individual coordinates
Construct new a vector where each coordinate is the same
The multiplicative identity
Compute the dot product between this vector and another
Linear interpolation between this vector and another
Compute the cross product between this vector and another.
The length of this vector squared. Note that this avoids an expensive square root.
The length of this vector. Note that this involves an expensive square root.
Normalize this vector to unit length. Note that this involves an expensive square root.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the / operator.
The resulting type after applying the / operator.
Convert a point into a vector
Convert a vector into a point
Convert a point into a vector
Convert a point into a vector
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the - operator.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.