15 explicit Radian(
float r = 0) : mRad(r) {}
17 Radian& operator = (
const float& f) { mRad = f;
return *
this; }
18 Radian& operator = (
const Radian& r) { mRad = r.mRad;
return *
this; }
21 float valueDegrees()
const;
22 float valueRadians()
const {
return mRad; }
23 float valueAngleUnits()
const;
25 operator float() {
return mRad; }
27 const Radian& operator + ()
const {
return *
this; }
30 Radian& operator += (
const Radian& r) { mRad += r.mRad;
return *
this; }
35 Radian& operator -= (
const Radian& r) { mRad -= r.mRad;
return *
this; }
37 Radian operator * (
float f)
const {
return Radian(mRad * f); }
39 Radian& operator *= (
float f) { mRad *= f;
return *
this; }
40 Radian operator / (
float f)
const {
return Radian(mRad / f); }
41 Radian& operator /= (
float f) { mRad /= f;
return *
this; }
43 bool operator < (
const Radian& r)
const {
return mRad < r.mRad; }
44 bool operator <= (
const Radian& r)
const {
return mRad <= r.mRad; }
45 bool operator == (
const Radian& r)
const {
return mRad == r.mRad; }
46 bool operator != (
const Radian& r)
const {
return mRad != r.mRad; }
47 bool operator >= (
const Radian& r)
const {
return mRad >= r.mRad; }
48 bool operator >(
const Radian& r)
const {
return mRad > r.mRad; }
61 explicit Degree(
float d = 0) : mDeg(d) {}
63 Degree& operator = (
const float& f) { mDeg = f;
return *
this; }
64 Degree& operator = (
const Degree& d) { mDeg = d.mDeg;
return *
this; }
65 Degree& operator = (
const Radian& r) { mDeg = r.valueDegrees();
return *
this; }
67 float valueDegrees()
const {
return mDeg; }
68 float valueRadians()
const;
69 float valueAngleUnits()
const;
71 const Degree& operator + ()
const {
return *
this; }
74 Degree& operator += (
const Degree& d) { mDeg += d.mDeg;
return *
this; }
75 Degree& operator += (
const Radian& r) { mDeg += r.valueDegrees();
return *
this; }
79 Degree& operator -= (
const Degree& d) { mDeg -= d.mDeg;
return *
this; }
80 Degree& operator -= (
const Radian& r) { mDeg -= r.valueDegrees();
return *
this; }
81 Degree operator * (
float f)
const {
return Degree(mDeg * f); }
83 Degree& operator *= (
float f) { mDeg *= f;
return *
this; }
84 Degree operator / (
float f)
const {
return Degree(mDeg / f); }
85 Degree& operator /= (
float f) { mDeg /= f;
return *
this; }
87 bool operator < (
const Degree& d)
const {
return mDeg < d.mDeg; }
88 bool operator <= (
const Degree& d)
const {
return mDeg <= d.mDeg; }
89 bool operator == (
const Degree& d)
const {
return mDeg == d.mDeg; }
90 bool operator != (
const Degree& d)
const {
return mDeg != d.mDeg; }
91 bool operator >= (
const Degree& d)
const {
return mDeg >= d.mDeg; }
92 bool operator >(
const Degree& d)
const {
return mDeg > d.mDeg; }
105 explicit Angle(
float angle) : mAngle(angle) {}
112 inline Radian::Radian(
const Degree& d) : mRad(d.valueRadians()) {
115 mRad = d.valueRadians();
return *
this;
117 inline Radian Radian::operator + (
const Degree& d)
const {
118 return Radian(mRad + d.valueRadians());
121 mRad += d.valueRadians();
124 inline Radian Radian::operator - (
const Degree& d)
const {
125 return Radian(mRad - d.valueRadians());
128 mRad -= d.valueRadians();
Wrapper class which indicates a given angle value is in Radians.
Definition: ParaAngle.h:10
different physics engine has different winding order.
Definition: EventBinding.h:32
Wrapper class which indicates a given angle value is in Degrees.
Definition: ParaAngle.h:56
Wrapper class which identifies a value as the currently default angle type, as defined by Math::setAn...
Definition: ParaAngle.h:101