9 #ifndef TurtleBrains_Angle_hpp
10 #define TurtleBrains_Angle_hpp
12 #include <turtle_brains/math/tb_constants.hpp>
13 #include <turtle_brains/math/tb_math.hpp>
79 inline Type
AsRadians(
void)
const {
return mAngle; }
84 inline Type
AsDegrees(
void)
const {
return tbMath::Convert::RadiansToDegrees(mAngle); }
92 return tbMath::IsEqual(mAngle, other.mAngle);
101 return !tbMath::IsEqual(mAngle, other.mAngle);
105 bool operator<(
const AngleType& other)
const
107 return mAngle < other.mAngle;
110 bool operator<=(
const AngleType& other)
const
112 return mAngle <= other.mAngle;
115 bool operator>(
const AngleType& other)
const
117 return mAngle > other.mAngle;
120 bool operator>=(
const AngleType& other)
const
122 return mAngle >= other.mAngle;
134 AngleType& operator+=(
const AngleType& other) { mAngle += other.mAngle;
return *
this; }
136 AngleType& operator-=(
const AngleType& other) { mAngle -= other.mAngle;
return *
this; }
138 AngleType operator*(
const Type& scalar)
const {
return Radians(mAngle * scalar); }
140 AngleType& operator*=(
const Type& scalar) { mAngle *= scalar;
return *
this; }
142 AngleType operator/(
const Type& scalar)
const {
return Radians(mAngle / scalar); }
144 AngleType& operator/=(
const Type& scalar) { mAngle /= scalar;
return *
this; }
AngleType< float > Angle
Definition: tb_angle.hpp:154
Type AsRadians(void) const
Definition: tb_angle.hpp:79
static AngleType Degrees(const Type angleInDegrees)
Definition: tb_angle.hpp:40
Contains objects and functions for dealing with Vector and Matrix math.
AngleUnit
Definition: tb_angle.hpp:23
AngleType(void)
Definition: tb_angle.hpp:58
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
bool operator!=(const AngleType &other) const
Definition: tb_angle.hpp:99
bool operator==(const AngleType &other) const
Definition: tb_angle.hpp:90
static AngleType Radians(const Type angleInRadians)
Definition: tb_angle.hpp:48
Specifies the angle input value is in units of Radians.
Specifies the angle input value is in units of Degrees.
Type AsDegrees(void) const
Definition: tb_angle.hpp:84
AngleType(const Type &angle, const AngleUnit units)
Definition: tb_angle.hpp:71
Definition: tb_angle.hpp:34
AngleType operator-() const
Definition: tb_angle.hpp:129