[−]Trait astral::math::num::One
Defines a multiplicative identity element for Self
.
Required methods
fn one() -> Self
Provided methods
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
Self: PartialEq<Self>,
Returns true
if self
is equal to the multiplicative identity.
For performance reasons, it's best to implement this manually.
After a semver bump, this method will be required, and the
where Self: PartialEq
bound will be removed.
Implementations on Foreign Types
impl One for i64
[src]
impl One for i16
[src]
impl One for i128
[src]
impl One for usize
[src]
impl One for f64
[src]
impl<T> One for Wrapping<T> where
T: One,
Wrapping<T>: Mul<Wrapping<T>>,
<Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>,
[src]
T: One,
Wrapping<T>: Mul<Wrapping<T>>,
<Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>,