Struct Vector3
Source #[repr(C)]
pub struct Vector3(pub [f64; 3]);
Build a new Vector3
struct from given x
, y
and z
coordinates
Returns the x
coordinate of the vector
Returns the y
coordinate of the vector
Returns the z
coordinate of the vector
Computes the dot product with other
Computes cross product with other
Computes the length of the vector
Computes the unit vector in the direction of this vector
Source§Implement addition operator for Vector3
The resulting type after applying the +
operator.
Source§Implement addition operator for Vector3
The resulting type after applying the +
operator.
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read moreSource§Scalar division for &Vector3
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
Source§Scalar multiplication for &Vector3
The resulting type after applying the *
operator.
Source§Scalar multiplication for Vector3
The resulting type after applying the *
operator.
Source§Implement negation operator for Vector3
The resulting type after applying the -
operator.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Source§Implement subtraction operator for Vector3
The resulting type after applying the -
operator.
Source§Implement subtraction operator for Vector3
The resulting type after applying the -
operator.
Source§Implement subtraction operator for Vector3
The resulting type after applying the -
operator.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.