Skip to main content

Angle

Type Alias Angle 

Source
pub type Angle = u16;
Expand description

An angle in the range [0, 65535], representing a full rotation [0, 2π).

The mapping is:

  • 0 → 0 radians
  • 16384 → π/2
  • 32768 → π
  • 49152 → 3π/2
  • 65535 → ~2π

This representation allows fast angle arithmetic using only bit shifts and avoids floating-point operations entirely.