Struct angular_units::Rad
[−]
[src]
pub struct Rad<T>(pub T);
An angular quantity measured in degrees.
Radians are uniquely defined from 0..2π.
Trait Implementations
impl<T: Copy> Copy for Rad<T>
[src]
impl<T: Clone> Clone for Rad<T>
[src]
fn clone(&self) -> Rad<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Rad<T>
[src]
impl<T: PartialEq> PartialEq for Rad<T>
[src]
fn eq(&self, __arg_0: &Rad<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rad<T>) -> bool
This method tests for !=
.
impl<T: PartialOrd> PartialOrd for Rad<T>
[src]
fn partial_cmp(&self, __arg_0: &Rad<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Rad<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Rad<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Rad<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Rad<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Hash> Hash for Rad<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<T: Float> Angle for Rad<T>
[src]
type Scalar = T
Internal type storing the angle value.
fn new(value: T) -> Rad<T>
Construct a new angle. Read more
fn period() -> T
The length of a full rotation.
fn scalar(&self) -> T
Return the scalar (unitless) value. Read more
fn set_scalar(&mut self, value: T)
Set the internal scalar value of the angle.
fn is_normalized(&self) -> bool
Whether the angle is in the standard domain.
fn normalize(self) -> Rad<T>
Normalize the angle, wrapping it back into the standard domain. Read more
fn sin(self) -> T
Compute the sine of an angle.
fn cos(self) -> T
Compute the cosine of an angle.
fn tan(self) -> T
Compute the tangent of an angle.
fn sin_cos(self) -> (T, T)
Simultaneously compute sine and cosine.
fn asin(value: T) -> Rad<T>
Compute the arcsine of a value, returning an angle.
fn acos(value: T) -> Rad<T>
Compute the arccosine of a value, returning an angle.
fn atan(value: T) -> Rad<T>
Compute the arctangent of a value, returning an angle.
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
fn full_turn() -> Self
Return one full rotation in some unit. Read more
fn half_turn() -> Self
Return one half of a full rotation in some unit.
fn quarter_turn() -> Self
Return one quarter of a full rotation in some unit.
fn invert(self) -> Self
Return the inverse of an angle. Read more
fn reflect_x(self) -> Self
Return the reflection of an angle over the x axis. Read more
impl<T: Float> Interpolate for Rad<T>
[src]
fn interpolate<U>(&self, right: &U, pos: Self::Scalar) -> Self where U: Clone + IntoAngle<Self, OutputScalar=Self::Scalar>
Perform a linear interpolation between two angles. Read more
fn interpolate_forward<U>(&self, right: &U, pos: Self::Scalar) -> Self where U: Clone + IntoAngle<Self, OutputScalar=Self::Scalar>
Perform a linear interpolation between two angles, going forward from self
to right
. Read more
impl<T: Float + ApproxEq> ApproxEq for Rad<T> where T::Epsilon: Clone
[src]
type Epsilon = T::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon)
-> bool
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon)
-> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon)
-> bool
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon)
-> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
impl<T: Rem<T, Output=T>> Rem for Rad<T>
[src]
type Output = Rad<T>
The resulting type after applying the %
operator
fn rem(self, rhs: Rad<T>) -> Rad<T>
The method for the %
operator
impl<T: RemAssign> RemAssign for Rad<T>
[src]
fn rem_assign(&mut self, rhs: Rad<T>)
The method for the %=
operator
impl<U, T> Add<U> for Rad<T> where T: Float + Add<T, Output=T>, U: IntoAngle<Rad<T>, OutputScalar=T>
[src]
type Output = Rad<T>
The resulting type after applying the +
operator
fn add(self, rhs: U) -> Rad<T>
The method for the +
operator
impl<U, T> AddAssign<U> for Rad<T> where T: Float + AddAssign<T>, U: IntoAngle<Rad<T>, OutputScalar=T>
[src]
fn add_assign(&mut self, rhs: U)
The method for the +=
operator
impl<U, T> Sub<U> for Rad<T> where T: Float + Sub<T, Output=T>, U: IntoAngle<Rad<T>, OutputScalar=T>
[src]
type Output = Rad<T>
The resulting type after applying the -
operator
fn sub(self, rhs: U) -> Rad<T>
The method for the -
operator
impl<U, T> SubAssign<U> for Rad<T> where T: Float + SubAssign<T>, U: IntoAngle<Rad<T>, OutputScalar=T>
[src]
fn sub_assign(&mut self, rhs: U)
The method for the -=
operator
impl<T: Mul<T, Output=T>> Mul<T> for Rad<T>
[src]
type Output = Rad<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Rad<T>
The method for the *
operator
impl<T: MulAssign<T>> MulAssign<T> for Rad<T>
[src]
fn mul_assign(&mut self, rhs: T)
The method for the *=
operator
impl<T: Div<T, Output=T>> Div<T> for Rad<T>
[src]
type Output = Rad<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Rad<T>
The method for the /
operator
impl<T: DivAssign<T>> DivAssign<T> for Rad<T>
[src]
fn div_assign(&mut self, rhs: T)
The method for the /=
operator
impl<T: Neg<Output=T>> Neg for Rad<T>
[src]
type Output = Rad<T>
The resulting type after applying the -
operator
fn neg(self) -> Rad<T>
The method for the unary -
operator
impl<T: Float> Zero for Rad<T>
[src]
fn zero() -> Rad<T>
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl<T: Zero> Default for Rad<T>
[src]
impl<T, U> FromAngle<U> for Rad<T> where U: Angle<Scalar=T>, T: Float
[src]
fn from_angle(from: U) -> Rad<T>
Construct Self
by converting a T
.