Struct angular_units::Rad
source · #[repr(transparent)]pub struct Rad<T>(pub T);
Expand description
An angular quantity measured in degrees.
Radians are uniquely defined from 0..2π.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
source§impl<T: Float + AbsDiffEq> AbsDiffEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
impl<T: Float + AbsDiffEq> AbsDiffEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
source§impl<U, T> Add<U> for Rad<T>where
T: Float + Add<T, Output = T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
impl<U, T> Add<U> for Rad<T>where
T: Float + Add<T, Output = T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
source§impl<U, T> AddAssign<U> for Rad<T>where
T: Float + AddAssign<T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
impl<U, T> AddAssign<U> for Rad<T>where
T: Float + AddAssign<T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
source§fn add_assign(&mut self, rhs: U)
fn add_assign(&mut self, rhs: U)
Performs the
+=
operation. Read moresource§impl<T: Float> Angle for Rad<T>
impl<T: Float> Angle for Rad<T>
source§fn set_scalar(&mut self, value: T)
fn set_scalar(&mut self, value: T)
Set the internal scalar value of the angle.
source§fn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Whether the angle is in the standard domain.
source§fn normalize(self) -> Rad<T>
fn normalize(self) -> Rad<T>
Normalize the angle, wrapping it back into the standard domain. Read more
source§fn atan2(y: T, x: T) -> Rad<T>
fn atan2(y: T, x: T) -> Rad<T>
Compute the arctangent of a value, using information from
the numerator and denominator in order to increase the domain. Read more
source§fn quarter_turn() -> Self
fn quarter_turn() -> Self
Return one quarter of a full rotation in some unit.
source§impl<T: DivAssign<T>> DivAssign<T> for Rad<T>
impl<T: DivAssign<T>> DivAssign<T> for Rad<T>
source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/=
operation. Read moresource§impl<T, U> FromAngle<U> for Rad<T>where
U: Angle<Scalar = T>,
T: Float,
impl<T, U> FromAngle<U> for Rad<T>where
U: Angle<Scalar = T>,
T: Float,
source§fn from_angle(from: U) -> Rad<T>
fn from_angle(from: U) -> Rad<T>
Construct
Self
by converting a T
.source§impl<T: Float> Interpolate for Rad<T>
impl<T: Float> Interpolate for Rad<T>
source§impl<T: MulAssign<T>> MulAssign<T> for Rad<T>
impl<T: MulAssign<T>> MulAssign<T> for Rad<T>
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moresource§impl<T: PartialOrd> PartialOrd<Rad<T>> for Rad<T>
impl<T: PartialOrd> PartialOrd<Rad<T>> for Rad<T>
1.0.0 · source§fn 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 moresource§impl<T: Float + RelativeEq> RelativeEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
impl<T: Float + RelativeEq> RelativeEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
source§impl<T: RemAssign> RemAssign<Rad<T>> for Rad<T>
impl<T: RemAssign> RemAssign<Rad<T>> for Rad<T>
source§fn rem_assign(&mut self, rhs: Rad<T>)
fn rem_assign(&mut self, rhs: Rad<T>)
Performs the
%=
operation. Read moresource§impl<U, T> Sub<U> for Rad<T>where
T: Float + Sub<T, Output = T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
impl<U, T> Sub<U> for Rad<T>where
T: Float + Sub<T, Output = T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
source§impl<U, T> SubAssign<U> for Rad<T>where
T: Float + SubAssign<T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
impl<U, T> SubAssign<U> for Rad<T>where
T: Float + SubAssign<T>,
U: IntoAngle<Rad<T>, OutputScalar = T>,
source§fn sub_assign(&mut self, rhs: U)
fn sub_assign(&mut self, rhs: U)
Performs the
-=
operation. Read moresource§impl<T: Float + UlpsEq> UlpsEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
impl<T: Float + UlpsEq> UlpsEq<Rad<T>> for Rad<T>where
T::Epsilon: Clone,
impl<T: Copy> Copy for Rad<T>
impl<T> StructuralPartialEq for Rad<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Rad<T>where
T: RefUnwindSafe,
impl<T> Send for Rad<T>where
T: Send,
impl<T> Sync for Rad<T>where
T: Sync,
impl<T> Unpin for Rad<T>where
T: Unpin,
impl<T> UnwindSafe for Rad<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T, U> IntoAngle<U> for Twhere
U: Angle<Scalar = <T as Angle>::Scalar> + FromAngle<T>,
T: Angle,
impl<T, U> IntoAngle<U> for Twhere
U: Angle<Scalar = <T as Angle>::Scalar> + FromAngle<T>,
T: Angle,
type OutputScalar = <T as Angle>::Scalar
source§fn into_angle(self) -> U
fn into_angle(self) -> U
Construct an angle from
self
.