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_TURNis retained for backward compatibility. It represents a quarter turn (90°).
Required Associated Constants§
Sourceconst QUARTED_TURN: f64
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.