Trait angular_units::Angle [] [src]

pub trait Angle: Clone {
    type Scalar: Float;
    fn period() -> Self::Scalar;
    fn scalar(&self) -> Self::Scalar;
    fn normalize(&self) -> Self;
    fn is_normalized(&self) -> bool;
    fn sin(self) -> Self::Scalar;
    fn cos(self) -> Self::Scalar;
    fn tan(self) -> Self::Scalar;
    fn sin_cos(self) -> (Self::Scalar, Self::Scalar);
    fn asin(value: Self::Scalar) -> Self;
    fn acos(value: Self::Scalar) -> Self;
    fn atan(value: Self::Scalar) -> Self;
    fn atan2(x: Self::Scalar, y: Self::Scalar) -> Self;
}

Base functionality for all angle types.

Associated Types

Internal type storing the angle value.

Required Methods

The length of a full rotation.

Return the scalar (unitless) value.

Equivalent to self.0 or to doing let Deg(val) = self

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

After normalization, an angle will be in the range [0, self.period()).

For performance reasons, normalization does not happen automatically during most operations. Thus, when passing an angle to a method that expects it to be within the standard domain, first normalize the angle.

Whether the angle is in the standard domain.

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.

Implementors