AngularUnit

Trait AngularUnit 

Source
pub trait AngularUnit: Unit<Dim = Angular> {
    const FULL_TURN: f64;
    const HALF_TURN: f64;
    const QUARTED_TURN: f64;
}
Expand description

Blanket extension trait for any Unit whose dimension is Angular.

These associated constants provide the size of key turn fractions expressed in the implementing unit. They are computed via a compile-time conversion from TAU radians (i.e., a full revolution) and then scaled. This keeps all fractions derived from the same base value.

Naming note: The historical spelling QUARTED_TURN is retained for backward compatibility. It represents a quarter turn (90°).

Required Associated Constants§

Source

const FULL_TURN: f64

One full revolution (τ radians / 360°) expressed in this unit.

Source

const HALF_TURN: f64

Half a revolution (π radians / 180°) expressed in this unit.

Source

const QUARTED_TURN: f64

A quarter revolution (π/2 radians / 90°) expressed in this unit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§