static Angle from_radians(T);
static Angle from_turns(T);
- static Angle zero() { return from_radians(0); }
- static Angle right() { return from_turns(0.25); }
+ static Angle zero() { return from_radians(T(0)); }
+ static Angle right() { return from_turns(T(0.25)); }
static Angle quarter_turn() { return right(); }
- static Angle straight() { return from_turns(0.5); }
+ static Angle straight() { return from_turns(T(0.5)); }
static Angle half_turn() { return straight(); }
- static Angle full_turn() { return from_turns(1); }
+ static Angle full_turn() { return from_turns(T(1)); }
- T degrees() const { return value*57.2957795130823208768; }
+ T degrees() const { return value*T(57.2957795130823208768); }
T radians() const { return value; }
- T turns() const { return value/6.28318530717958647692; }
+ T turns() const { return value/T(6.28318530717958647692); }
Angle &operator+=(Angle);
Angle &operator-=(Angle);
template<typename T>
inline Angle<T> &Angle<T>::wrap_with_base(Angle<T> b)
{
- const T two_pi = 6.28318530717958647692;
+ const T two_pi = T(6.28318530717958647692);
while(value<b.value)
value += two_pi;
while(value>=b.value+two_pi)