rust-angular-units
Documentation: https://tylerreisinger.github.io/rust-angular-units
Feature-rich library for representing and manipulating angular quantities. Provides strongly-typed structs for each unit as well as helper traits for abstracting over the concrete types.
Provided Units:
- Degrees -
Deg<T>
- Radians -
Rad<T>
- Turns -
Turns<T>
(1 turn is a full rotation) - Arc minutes -
ArcMinutes<T>
- Arc seconds -
ArcSeconds<T>
Usage:
[]
= "0.1"
Examples:
- Converting from Degrees to Radians:
let angle = Deg;
let radians: = angle.into_angle;
- Composing angles from multiple units:
let degrees: = Deg + ArcMinutes + Rad;