Struct oxygen_quark::vector::vector2d::Vector2D
source · Fields
data: [Fraction; 2]
The x-coordinate of the vector
Trait Implementations
sourceimpl AddAssign<Vector2D> for Vector2D
impl AddAssign<Vector2D> for Vector2D
sourcefn add_assign(&mut self, other: Vector2D)
fn add_assign(&mut self, other: Vector2D)
Performs the
+=
operation. Read moresourceimpl Ord for Vector2D
impl Ord for Vector2D
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Vector2D> for Vector2D
impl PartialOrd<Vector2D> for Vector2D
sourcefn partial_cmp(&self, other: &Vector2D) -> Option<Ordering>
fn partial_cmp(&self, other: &Vector2D) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl SubAssign<Vector2D> for Vector2D
impl SubAssign<Vector2D> for Vector2D
sourcefn sub_assign(&mut self, other: Vector2D)
fn sub_assign(&mut self, other: Vector2D)
Performs the
-=
operation. Read moresourceimpl TransformVector<Vector2D> for Matrix2x2
impl TransformVector<Vector2D> for Matrix2x2
fn transform_vector(&self, other: Vector2D) -> Result<Vector2D, VectorError>
sourceimpl TransformVector<Vector2D> for Matrix3x3
impl TransformVector<Vector2D> for Matrix3x3
sourcefn transform_vector(&self, other: Vector2D) -> Result<Vector2D, VectorError>
fn transform_vector(&self, other: Vector2D) -> Result<Vector2D, VectorError>
Transforms a Vector2D
with the Matrix3x3
and returns the result, a Option<Vector2D>
.
sourceimpl Vector for Vector2D
impl Vector for Vector2D
type Data = Fraction
fn from(values: &[Self::Data]) -> Self
fn component_product(self, other: Self) -> Self
fn dot_product(self, other: Self) -> Self::Data
fn cross_product(self, _other: Self) -> Result<Self, VectorError>where
Self: Sized,
fn scale(&self, scale: Self::Data) -> Self
fn norm(self) -> Self::Data
fn normalise(self) -> Self
impl Copy for Vector2D
impl Eq for Vector2D
Auto Trait Implementations
impl RefUnwindSafe for Vector2D
impl Send for Vector2D
impl Sync for Vector2D
impl Unpin for Vector2D
impl UnwindSafe for Vector2D
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more