[−][src]Trait metfor::VectorQuantity
A version of Quantity
for vectors.
Required methods
fn pack_xy(_: (S, S)) -> Self
Create a new instance of self by wrapping some values. This must be x-y coordinates from the standard cartesian coordinate system.
fn unpack_xy(self) -> (S, S)
Unpack a wrapped value without any error checking. The returned values represent the vector in a standard x-y cartesian coordinate system.
fn unwrap_xy(self) -> (S, S)
Unwrap the values from the new type and check validity, panic if contents are invalid. The returned values represent the vector in a standard x-y cartesian coordinate system.
fn into_option(self) -> Option<(S, S)>
Convert into an option that is None
if the content is invalid. The returned values
represent the vector in a standard x-y cartesian coordinate system.
fn abs(&self) -> S
Get the magnitude of the vector.
Provided methods
fn approx_eq<RHS, T, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,
Test whether these two vectors are close by looking at the magnitude of their difference.
Implementors
impl<S> VectorQuantity<S> for WindSpdDir<S> where
S: Quantity + PartialOrd,
[src]
S: Quantity + PartialOrd,
fn pack_xy(vals: (S, S)) -> Self
[src]
fn unpack_xy(self) -> (S, S)
[src]
fn unwrap_xy(self) -> (S, S)
[src]
fn abs(&self) -> S
[src]
fn into_option(self) -> Option<(S, S)>
[src]
fn approx_eq<RHS, T, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,
[src]
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,
impl<S> VectorQuantity<S> for WindUV<S> where
S: Quantity,
[src]
S: Quantity,
fn pack_xy(vals: (S, S)) -> Self
[src]
fn unpack_xy(self) -> (S, S)
[src]
fn unwrap_xy(self) -> (S, S)
[src]
fn into_option(self) -> Option<(S, S)>
[src]
fn abs(&self) -> S
[src]
fn approx_eq<RHS, T, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,
[src]
Self: From<RHS> + Sub<Self, Output = Self>,
S: From<TOL> + From<T> + PartialOrd,
RHS: VectorQuantity<T>,
T: Quantity,