Struct figures::Vector [−][src]
pub struct Vector<T, Unit> {
pub x: T,
pub y: T,
// some fields omitted
}
Expand description
A 2d measurement using x and y values.
Fields
x: T
y: T
Implementations
Returns a new Vector
.
Attempts to convert from T
to Output
using
NumCast
. Returns None if the value
can’t be converted.
Trait Implementations
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of AbsDiffEq::abs_diff_eq
.
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Returns true if the values are approximately equal. Uses
approx::AbsDiffEq
with the default epsilon. Read more
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
impl<T, Unit> RelativeEq<Vector<T, Unit>> for Vector<T, Unit> where
T: RelativeEq<Epsilon = T> + Copy,
impl<T, Unit> RelativeEq<Vector<T, Unit>> for Vector<T, Unit> where
T: RelativeEq<Epsilon = T> + Copy,
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of RelativeEq::relative_eq
.
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
Auto Trait Implementations
impl<T, Unit> RefUnwindSafe for Vector<T, Unit> where
T: RefUnwindSafe,
Unit: RefUnwindSafe,
impl<T, Unit> UnwindSafe for Vector<T, Unit> where
T: UnwindSafe,
Unit: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more