Struct angular_units::Deg [] [src]

pub struct Deg<T>(pub T);

An angular quantity measured in degrees.

Degrees are uniquely defined from 0..360.

Methods

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

Construct a Deg instance from base degrees, minutes and seconds.

The opposite of decompose. Equivalent to adding the components together:

    let angle = Deg(50.0) + ArcMinutes(30.0) + ArcSeconds(10.0);
    assert_eq!(angle, Deg::from_components(Deg(50.0),
        ArcMinutes(30.0), ArcSeconds(10.0)));

Split an angle in degrees into base degrees, minutes and seconds.

If the decomposition would not be perfect, seconds will be a fractional value.

Trait Implementations

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

impl<T: PartialEq> PartialEq for Deg<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 Deg<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 Deg<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 Deg<T>
[src]

Internal type storing the angle value.

Construct a new angle. Read more

The length of a full rotation.

Return the scalar (unitless) value. Read more

Set the internal scalar value of the angle.

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

Return one full rotation in some unit. Read more

Return one half of a full rotation in some unit.

Return one quarter of a full rotation in some unit.

Return the inverse of an angle. Read more

Return the reflection of an angle over the x axis. Read more

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

Perform a linear interpolation between two angles. Read more

Perform a linear interpolation between two angles, going forward from self to right. Read more

impl<T: Float + ApproxEq> ApproxEq for Deg<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 Deg<T>
[src]

The resulting type after applying the % operator

The method for the % operator

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

The method for the %= operator

impl<U, T> Add<U> for Deg<T> where T: Float + Add<T, Output=T>, U: IntoAngle<Deg<T>, OutputScalar=T>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<U, T> AddAssign<U> for Deg<T> where T: Float + AddAssign<T>, U: IntoAngle<Deg<T>, OutputScalar=T>
[src]

The method for the += operator

impl<U, T> Sub<U> for Deg<T> where T: Float + Sub<T, Output=T>, U: IntoAngle<Deg<T>, OutputScalar=T>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<U, T> SubAssign<U> for Deg<T> where T: Float + SubAssign<T>, U: IntoAngle<Deg<T>, OutputScalar=T>
[src]

The method for the -= operator

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

The resulting type after applying the * operator

The method for the * operator

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

The method for the *= operator

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

The resulting type after applying the / operator

The method for the / operator

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

The method for the /= operator

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

The resulting type after applying the - operator

The method for the unary - operator

impl<T: Float> Zero for Deg<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 Deg<T>
[src]

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

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

Construct Self by converting a T.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Formats the value using the given formatter.