#[repr(C)]pub struct Rad<S>(pub S);Expand description
An angle, in radians.
This type is marked as #[repr(C)].
Tuple Fields
0: STrait Implementations
sourceimpl<S> AbsDiffEq<Rad<S>> for Rad<S> where
S: BaseFloat,
impl<S> AbsDiffEq<Rad<S>> for Rad<S> where
S: BaseFloat,
type Epsilon = <S as AbsDiffEq<S>>::Epsilon
type Epsilon = <S as AbsDiffEq<S>>::Epsilon
Used for specifying relative comparisons.
sourcefn default_epsilon() -> <S as AbsDiffEq<S>>::Epsilon
fn default_epsilon() -> <S as AbsDiffEq<S>>::Epsilon
The default tolerance to use when testing values that are close together. Read more
sourcefn abs_diff_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn abs_diff_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of [AbsDiffEq::abs_diff_eq].
sourceimpl<S> AddAssign<Rad<S>> for Rad<S> where
S: BaseFloat + AddAssign<S>,
impl<S> AddAssign<Rad<S>> for Rad<S> where
S: BaseFloat + AddAssign<S>,
sourcefn add_assign(&mut self, other: Rad<S>)
fn add_assign(&mut self, other: Rad<S>)
Performs the += operation. Read more
sourceimpl<S> Angle for Rad<S> where
S: BaseFloat,
impl<S> Angle for Rad<S> where
S: BaseFloat,
type Unitless = S
sourcefn sin_cos(self) -> (S, S)
fn sin_cos(self) -> (S, S)
Compute the sine and cosine of the angle, returning the result as a pair. Read more
sourcefn asin(a: S) -> Rad<S>
fn asin(a: S) -> Rad<S>
Compute the arcsine of the ratio, returning the resulting angle. Read more
sourcefn acos(a: S) -> Rad<S>
fn acos(a: S) -> Rad<S>
Compute the arccosine of the ratio, returning the resulting angle. Read more
sourcefn atan(a: S) -> Rad<S>
fn atan(a: S) -> Rad<S>
Compute the arctangent of the ratio, returning the resulting angle. Read more
fn atan2(a: S, b: S) -> Rad<S>
sourcefn normalize_signed(self) -> Self
fn normalize_signed(self) -> Self
Return the angle, normalized to the range [-turn_div_2, turn_div_2).
sourcefn turn_div_2() -> Self
fn turn_div_2() -> Self
Half of a full rotation.
sourcefn turn_div_3() -> Self
fn turn_div_3() -> Self
A third of a full rotation.
sourcefn turn_div_4() -> Self
fn turn_div_4() -> Self
A quarter of a full rotation.
sourcefn turn_div_6() -> Self
fn turn_div_6() -> Self
A sixth of a full rotation.
sourceimpl<S> DivAssign<S> for Rad<S> where
S: BaseFloat + DivAssign<S>,
impl<S> DivAssign<S> for Rad<S> where
S: BaseFloat + DivAssign<S>,
sourcefn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
Performs the /= operation. Read more
sourceimpl<S> MulAssign<S> for Rad<S> where
S: BaseFloat + MulAssign<S>,
impl<S> MulAssign<S> for Rad<S> where
S: BaseFloat + MulAssign<S>,
sourcefn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the *= operation. Read more
sourceimpl<S> PartialOrd<Rad<S>> for Rad<S> where
S: PartialOrd<S>,
impl<S> PartialOrd<Rad<S>> for Rad<S> where
S: PartialOrd<S>,
sourcefn partial_cmp(&self, other: &Rad<S>) -> Option<Ordering>
fn partial_cmp(&self, other: &Rad<S>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl<S> RelativeEq<Rad<S>> for Rad<S> where
S: BaseFloat,
impl<S> RelativeEq<Rad<S>> for Rad<S> where
S: BaseFloat,
sourcefn default_max_relative() -> <S as AbsDiffEq<S>>::Epsilon
fn default_max_relative() -> <S as AbsDiffEq<S>>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
sourcefn relative_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn relative_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of [RelativeEq::relative_eq].
sourceimpl<S> RemAssign<Rad<S>> for Rad<S> where
S: BaseFloat + RemAssign<S>,
impl<S> RemAssign<Rad<S>> for Rad<S> where
S: BaseFloat + RemAssign<S>,
sourcefn rem_assign(&mut self, other: Rad<S>)
fn rem_assign(&mut self, other: Rad<S>)
Performs the %= operation. Read more
sourceimpl<S> SubAssign<Rad<S>> for Rad<S> where
S: BaseFloat + SubAssign<S>,
impl<S> SubAssign<Rad<S>> for Rad<S> where
S: BaseFloat + SubAssign<S>,
sourcefn sub_assign(&mut self, other: Rad<S>)
fn sub_assign(&mut self, other: Rad<S>)
Performs the -= operation. Read more
sourceimpl<S> UlpsEq<Rad<S>> for Rad<S> where
S: BaseFloat,
impl<S> UlpsEq<Rad<S>> for Rad<S> where
S: BaseFloat,
sourcefn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
impl<S> Copy for Rad<S> where
S: Copy,
impl<S> StructuralPartialEq for Rad<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for Rad<S> where
S: RefUnwindSafe,
impl<S> Send for Rad<S> where
S: Send,
impl<S> Sync for Rad<S> where
S: Sync,
impl<S> Unpin for Rad<S> where
S: Unpin,
impl<S> UnwindSafe for Rad<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> LowerBounded for T where
T: Bounded,
impl<T> LowerBounded for T where
T: Bounded,
sourceimpl<T> UpperBounded for T where
T: Bounded,
impl<T> UpperBounded for T where
T: Bounded,
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more