pub struct Vector2 {
pub x: f64,
pub y: f64,
}
Expand description
The resulting type after applying the +
operator.
Area of the parallelepiped formed by two vectors, non-oriented
Cosine of the angle between the two vectors, non-oriented
Sine of the angle between the two vectors, non-oriented
Angle between two vectors, non-oriented
Convert the object to array
Set the object from array
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.
Get a inhomogeneous vector from an homogeneous vector Read more
Get a vector transformed to an homogeneous vector Read more
Set the linear interpolation
Set the Hermite’s interpolation
Set the Bezier’s interpolation
Get cubic Hermite’s interpolation, ie. with two tangent values
Get cubic Bezier’s interpolation, ie. with two control points
Dot product of the two objects
Squared magnitude of an object
Squared distance between the two objects
Distance between the two objects
Normalizes the vector, ie. sets magnitude to 1 without changing direction
Get the normalized vector, ie. vector with same direction and magnitude 1
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 !=
.
Get a vector from polar coordinates
Set a vector from polar coordinates
Get a unit polar radial vector from angle
Get a unit tangent/prograde vector from angle
The resulting type after applying the %
operator.
Fills an object with zeros
Fills a object with a given value
Set a rigid body matrix from the given rotation matrix and translation vector
Get a rigid body matrix from rotation matrix and translation vector
Set a similarity matrix from scale factor, rotation matrix and translation vector
Get a similarity matrix from scale factor, rotation matrix and translation vector
Get the two parts of the split object
Concatenates two part to construct an object
Get the first part of the object
Get the second part of the object
Set the first part of the object
Set the second part of the object
The resulting type after applying the -
operator.
Set a translation matrix from translation vector
Get a translation matrix from translation vector
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
)
recently added
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.