Struct angular_units::Rad [] [src]

pub struct Rad<T>(pub T);

An angular quantity measured in degrees.

Radians are uniquely defined from 0..2π.

Methods

impl<T: Float> Rad<T>
[src]

Construct a new angle.

Equivalent to constructing the tuple struct directly, eg. Deg(value).

Trait Implementations

impl<T: Copy> Copy for Rad<T>
[src]

impl<T: Clone> Clone for Rad<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Rad<T>
[src]

Formats the value using the given formatter.

impl<T: PartialEq> PartialEq for Rad<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: PartialOrd> PartialOrd for Rad<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<T: Float> Angle for Rad<T>
[src]

Internal type storing the angle value.

The length of a full rotation.

Return the scalar (unitless) value. Read more

Whether the angle is in the standard domain.

Normalize the angle, wrapping it back into the standard domain. Read more

Compute the sine of an angle.

Compute the cosine of an angle.

Compute the tangent of an angle.

Simultaneously compute sine and cosine.

Compute the arcsine of a value, returning an angle.

Compute the arccosine of a value, returning an angle.

Compute the arctangent of a value, returning an angle.

Compute the arctangent of a value, using information from the numerator and denominator in order to increase the domain. Read more

impl<T: Float> Interpolate for Rad<T>
[src]

Perform a linear interpolation between two angles. Read more

impl<T: Float + ApproxEq> ApproxEq for Rad<T> where T::Epsilon: Clone
[src]

Used for specifying relative comparisons.

The default tolerance to use when testing values that are close together. Read more

The default relative tolerance for testing values that are far-apart. Read more

The default ULPs to tolerate when testing values that are far-apart. Read more

A test for equality that uses a relative comparison if the values are far apart.

A test for equality that uses units in the last place (ULP) if the values are far apart.

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<T: Rem<T, Output=T>> Rem for Rad<T>
[src]

The resulting type after applying the % operator

The method for the % operator

impl<T: RemAssign> RemAssign for Rad<T>
[src]

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]

The resulting type after applying the + operator

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]

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]

The resulting type after applying the - operator

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]

The method for the -= operator

impl<T: Mul<T, Output=T>> Mul<T> for Rad<T>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T: MulAssign<T>> MulAssign<T> for Rad<T>
[src]

The method for the *= operator

impl<T: Div<T, Output=T>> Div<T> for Rad<T>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T: DivAssign<T>> DivAssign<T> for Rad<T>
[src]

The method for the /= operator

impl<T: Neg<Output=T>> Neg for Rad<T>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<T: Float> Zero for Rad<T>
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl<T: Zero> Default for Rad<T>
[src]

Returns the "default value" for a type. Read more

impl<T, U> FromAngle<U> for Rad<T> where U: Angle<Scalar=T>, T: Float
[src]

Construct Self by converting a T.

impl<T: Float> From<Deg<T>> for Rad<T>
[src]

Performs the conversion.

impl<T: Float> From<Turns<T>> for Rad<T>
[src]

Performs the conversion.

impl<T: Display> Display for Rad<T>
[src]

Formats the value using the given formatter.