Template constructor that converts numeric types to Angle via Fxp.
- Template Parameters
-
T | Numeric type (integral or floating-point) |
- Parameters
-
turns | Angle in turns represented by type T (where 1.0 = 360°) |
- Note
- This constructor allows conversion from numeric types to an Angle object. Values are interpreted as turns, where:
- 0.0 = 0° = 0 turns
- 0.25 = 90° = 1/4 turn
- 0.5 = 180° = 1/2 turn
- 0.75 = 270° = 3/4 turn
- 1.0 = 360° = 1 turn = 0 turns (full circle)
Integer values (0, 1, 2, etc.) all map to 0 due to wrapping behavior. For example, 1 turn = 360° = 0° after wrapping.
Values outside the range [0,1] are automatically wrapped around.