#[repr(transparent)]pub struct Gradians<A>(pub A);Expand description
Unit wrapper for the gradian unit.
See the module level documentation for more details.
Tuple Fields§
§0: AImplementations§
Source§impl<F: Float> Gradians<Angle<F>>
impl<F: Float> Gradians<Angle<F>>
Sourcepub fn to_value(self) -> F
pub fn to_value(self) -> F
Returns the value of the angle in the gradian unit.
The value is in the main range.
Sourcepub fn from_value(x: F) -> Self
pub fn from_value(x: F) -> Self
Converts a value in gradian into an angle.
Source§impl<F: Float> Gradians<AngleUnbounded<F>>
impl<F: Float> Gradians<AngleUnbounded<F>>
Sourcepub fn from_value(x: F) -> Self
pub fn from_value(x: F) -> Self
Converts a value in gradian into an angle.
Trait Implementations§
Source§impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for Gradians<Angle<F>>
Available on crate feature serde only.
impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for Gradians<Angle<F>>
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for Gradians<AngleUnbounded<F>>
Available on crate feature serde only.
impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for Gradians<AngleUnbounded<F>>
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Distribution<Gradians<T>> for Standardwhere
Self: Distribution<T>,
Available on crate feature rand only.
impl<T> Distribution<Gradians<T>> for Standardwhere
Self: Distribution<T>,
Available on crate feature
rand only.Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Gradians<T>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Gradians<T>
Generate a random value of
T, using rng as the source of randomness.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T, using rng as
the source of randomness. Read moreSource§impl<F: Float + Serialize> Serialize for Gradians<Angle<F>>
Available on crate feature serde only.
impl<F: Float + Serialize> Serialize for Gradians<Angle<F>>
Available on crate feature
serde only.Source§impl<F: Float + Serialize> Serialize for Gradians<AngleUnbounded<F>>
Available on crate feature serde only.
impl<F: Float + Serialize> Serialize for Gradians<AngleUnbounded<F>>
Available on crate feature
serde only.impl<A: Copy> Copy for Gradians<A>
Auto Trait Implementations§
impl<A> Freeze for Gradians<A>where
A: Freeze,
impl<A> RefUnwindSafe for Gradians<A>where
A: RefUnwindSafe,
impl<A> Send for Gradians<A>where
A: Send,
impl<A> Sync for Gradians<A>where
A: Sync,
impl<A> Unpin for Gradians<A>where
A: Unpin,
impl<A> UnwindSafe for Gradians<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more