Ion
|
A simple class to represent angles. More...
#include "angle.h"
Public Member Functions | |
Angle () | |
The default constructor creates an angle of 0 (in any unit). More... | |
template<typename U > | |
Angle (const Angle< U > other) | |
Copy constructor from an instance of any value type that is compatible (via static_cast) with this instance's type. More... | |
T | Radians () const |
Get the angle in degrees or radians. More... | |
T | Degrees () const |
const Angle | operator- () const |
Unary negation operator. More... | |
void | operator+= (const Angle &a) |
Self-modifying operators. More... | |
void | operator-= (const Angle &a) |
void | operator*= (T s) |
void | operator/= (T s) |
Static Public Member Functions | |
static Angle | FromRadians (const T &angle) |
Create a angle from radians (no conversion). More... | |
static Angle | FromDegrees (const T &angle) |
Create a angle from degrees (requires conversion). More... | |
Friends | |
const Angle | operator+ (const Angle &a0, const Angle &a1) |
Binary operators. More... | |
const Angle | operator- (const Angle &a0, const Angle &a1) |
const Angle | operator* (const Angle &a, T s) |
const Angle | operator* (T s, const Angle &a) |
const Angle | operator/ (const Angle &a, T s) |
bool | operator== (const Angle &a0, const Angle &a1) |
Exact equality and inequality comparisons. More... | |
bool | operator!= (const Angle &a0, const Angle &a1) |
bool | operator< (const Angle &a0, const Angle &a1) |
Comparisons. More... | |
bool | operator> (const Angle &a0, const Angle &a1) |
bool | operator<= (const Angle &a0, const Angle &a1) |
bool | operator>= (const Angle &a0, const Angle &a1) |
A simple class to represent angles.
The fundamental angular unit is radians, with conversion provided to and from degrees.
|
inline |
The default constructor creates an angle of 0 (in any unit).
Definition at line 36 of file angle.h.
Referenced by ion::math::Angle< T >::FromDegrees(), and ion::math::Angle< T >::FromRadians().
|
inlineexplicit |
|
inline |
|
inlinestatic |
Create a angle from degrees (requires conversion).
Definition at line 50 of file angle.h.
References ion::math::Angle< T >::Angle().
Referenced by ion::math::operator>>().
|
inlinestatic |
Create a angle from radians (no conversion).
Definition at line 45 of file angle.h.
References ion::math::Angle< T >::Angle().
Referenced by ion::math::ArcCosine(), ion::math::ArcSine(), ion::math::ArcTangent(), ion::math::ArcTangent2(), ion::math::FieldOfView< T >::FromTangents(), ion::math::FieldOfView< T >::GetCenteredFovY(), ion::math::Angle< T >::operator-(), and ion::math::operator>>().
|
inline |
|
inline |
|
inline |
Unary negation operator.
Definition at line 61 of file angle.h.
References ion::math::Angle< T >::FromRadians().
|
inline |
|
inline |
|
inline |
Get the angle in degrees or radians.
Definition at line 55 of file angle.h.
Referenced by ion::math::Cosine(), ion::math::PerspectiveMatrixFromView(), ion::math::Sine(), and ion::math::Tangent().