Struct oxygen_quark::vector::vector2d::Vector2D
source · Fields§
§x: Fraction
The x-coordinate of the vector
y: Fraction
The y-coordinate of the vector
Implementations§
source§impl Vector2D
impl Vector2D
sourcepub fn component_product(self, other: Vector2D) -> Vector2D
pub fn component_product(self, other: Vector2D) -> Vector2D
Returns a new Vector2D
containing the product of every component in a Vector2D
with the corresponding component in another one.
sourcepub fn dot_product(self, other: Vector2D) -> Fraction
pub fn dot_product(self, other: Vector2D) -> Fraction
Returns a Fraction
that is the result of the dot-product between two Vector2D
s.
Trait Implementations§
source§impl AddAssign<Vector2D> for Vector2D
impl AddAssign<Vector2D> for Vector2D
source§fn add_assign(&mut self, other: Vector2D)
fn add_assign(&mut self, other: Vector2D)
Performs the
+=
operation. Read moresource§impl Ord for Vector2D
impl Ord for Vector2D
source§impl PartialOrd<Vector2D> for Vector2D
impl PartialOrd<Vector2D> for Vector2D
1.0.0 · source§fn 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 moresource§impl SubAssign<Vector2D> for Vector2D
impl SubAssign<Vector2D> for Vector2D
source§fn sub_assign(&mut self, other: Vector2D)
fn sub_assign(&mut self, other: Vector2D)
Performs the
-=
operation. Read more