[−][src]Struct geom::Distance
In meters. Can be negative.
Implementations
impl Distance
[src]
pub const ZERO: Distance
[src]
pub fn meters(value: f64) -> Distance
[src]
pub const fn const_meters(value: f64) -> Distance
[src]
pub fn inches(value: f64) -> Distance
[src]
pub fn miles(value: f64) -> Distance
[src]
pub fn centimeters(value: usize) -> Distance
[src]
pub fn abs(self) -> Distance
[src]
pub fn sqrt(self) -> Distance
[src]
pub fn inner_meters(self) -> f64
[src]
pub fn describe_rounded(self) -> String
[src]
pub fn max(self, other: Distance) -> Distance
[src]
pub fn min(self, other: Distance) -> Distance
[src]
Trait Implementations
impl Add<Distance> for Distance
[src]
type Output = Distance
The resulting type after applying the +
operator.
fn add(self, other: Distance) -> Distance
[src]
impl AddAssign<Distance> for Distance
[src]
fn add_assign(&mut self, other: Distance)
[src]
impl Clone for Distance
[src]
impl Copy for Distance
[src]
impl Debug for Distance
[src]
impl Default for Distance
[src]
impl<'de> Deserialize<'de> for Distance
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Distance
[src]
impl Div<Distance> for Distance
[src]
type Output = f64
The resulting type after applying the /
operator.
fn div(self, other: Distance) -> f64
[src]
impl Div<Speed> for Distance
[src]
type Output = Duration
The resulting type after applying the /
operator.
fn div(self, other: Speed) -> Duration
[src]
impl Div<f64> for Distance
[src]
type Output = Distance
The resulting type after applying the /
operator.
fn div(self, scalar: f64) -> Distance
[src]
impl Eq for Distance
[src]
impl Mul<Distance> for f64
[src]
type Output = Distance
The resulting type after applying the *
operator.
fn mul(self, other: Distance) -> Distance
[src]
impl Mul<f64> for Distance
[src]
type Output = Distance
The resulting type after applying the *
operator.
fn mul(self, scalar: f64) -> Distance
[src]
impl Neg for Distance
[src]
type Output = Distance
The resulting type after applying the -
operator.
fn neg(self) -> Distance
[src]
impl Ord for Distance
[src]
fn cmp(&self, other: &Distance) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Distance> for Distance
[src]
impl PartialOrd<Distance> for Distance
[src]
fn partial_cmp(&self, other: &Distance) -> Option<Ordering>
[src]
fn lt(&self, other: &Distance) -> bool
[src]
fn le(&self, other: &Distance) -> bool
[src]
fn gt(&self, other: &Distance) -> bool
[src]
fn ge(&self, other: &Distance) -> bool
[src]
impl Serialize for Distance
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Distance
[src]
impl Sub<Distance> for Distance
[src]
type Output = Distance
The resulting type after applying the -
operator.
fn sub(self, other: Distance) -> Distance
[src]
impl SubAssign<Distance> for Distance
[src]
fn sub_assign(&mut self, other: Distance)
[src]
impl Sum<Distance> for Distance
[src]
Auto Trait Implementations
impl RefUnwindSafe for Distance
impl Send for Distance
impl Sync for Distance
impl Unpin for Distance
impl UnwindSafe for Distance
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,