SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ Angle() [3/3]

template<typename T>
requires std::integral<T> || std::floating_point<T>
SRL::Math::Types::Angle::Angle ( const T & turns)
inlineconstexpr

Template constructor that converts numeric types to Angle via Fxp.

Template Parameters
TNumeric type (integral or floating-point)
Parameters
turnsAngle 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.