#[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§
Source§impl<S> AbsDiffEq for Rad<S>where
S: BaseFloat,
impl<S> AbsDiffEq for Rad<S>where
S: BaseFloat,
Source§fn default_epsilon() -> <S as AbsDiffEq>::Epsilon
fn default_epsilon() -> <S as AbsDiffEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &Rad<S>, epsilon: <S as AbsDiffEq>::Epsilon, ) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§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.Source§impl<S> AddAssign for Rad<S>
impl<S> AddAssign for Rad<S>
Source§fn add_assign(&mut self, other: Rad<S>)
fn add_assign(&mut self, other: Rad<S>)
Performs the
+= operation. Read moreSource§impl<S> Angle for Rad<S>where
S: BaseFloat,
impl<S> Angle for Rad<S>where
S: BaseFloat,
type Unitless = S
Source§fn 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
Source§fn asin(a: S) -> Rad<S>
fn asin(a: S) -> Rad<S>
Compute the arcsine of the ratio, returning the resulting angle. Read more
Source§fn acos(a: S) -> Rad<S>
fn acos(a: S) -> Rad<S>
Compute the arccosine of the ratio, returning the resulting angle. Read more
Source§fn 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>
Source§fn normalize_signed(self) -> Self
fn normalize_signed(self) -> Self
Return the angle, normalized to the range
[-turn_div_2, turn_div_2).Source§fn turn_div_2() -> Self
fn turn_div_2() -> Self
Half of a full rotation.
Source§fn turn_div_3() -> Self
fn turn_div_3() -> Self
A third of a full rotation.
Source§fn turn_div_4() -> Self
fn turn_div_4() -> Self
A quarter of a full rotation.
Source§fn turn_div_6() -> Self
fn turn_div_6() -> Self
A sixth of a full rotation.
Source§impl<S> DivAssign<S> for Rad<S>
impl<S> DivAssign<S> for Rad<S>
Source§fn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
Performs the
/= operation. Read moreSource§impl<S> MulAssign<S> for Rad<S>
impl<S> MulAssign<S> for Rad<S>
Source§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the
*= operation. Read moreSource§impl<S> PartialOrd for Rad<S>where
S: PartialOrd,
impl<S> PartialOrd for Rad<S>where
S: PartialOrd,
Source§impl<S> RelativeEq for Rad<S>where
S: BaseFloat,
impl<S> RelativeEq for Rad<S>where
S: BaseFloat,
Source§fn default_max_relative() -> <S as AbsDiffEq>::Epsilon
fn default_max_relative() -> <S as AbsDiffEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Rad<S>,
epsilon: <S as AbsDiffEq>::Epsilon,
max_relative: <S as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Rad<S>, epsilon: <S as AbsDiffEq>::Epsilon, max_relative: <S as AbsDiffEq>::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§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.Source§impl<S> RemAssign for Rad<S>
impl<S> RemAssign for Rad<S>
Source§fn rem_assign(&mut self, other: Rad<S>)
fn rem_assign(&mut self, other: Rad<S>)
Performs the
%= operation. Read moreSource§impl<S> SubAssign for Rad<S>
impl<S> SubAssign for Rad<S>
Source§fn sub_assign(&mut self, other: Rad<S>)
fn sub_assign(&mut self, other: Rad<S>)
Performs the
-= operation. Read moreSource§impl<S> UlpsEq for Rad<S>where
S: BaseFloat,
impl<S> UlpsEq for Rad<S>where
S: BaseFloat,
Source§fn 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> Freeze for Rad<S>where
S: Freeze,
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LowerBounded for Twhere
T: Bounded,
impl<T> LowerBounded for Twhere
T: Bounded,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.