|
| XII_DECLARE_POD_TYPE () |
|
constexpr | xiiAngleTemplate () |
| Standard constructor, initializing with 0.
|
|
constexpr Type | GetDegree () const |
| Returns the degree value. (Performs a conversion)
|
|
constexpr Type | GetRadian () const |
| Returns the radian value. (No need for any conversion)
|
|
XII_ALWAYS_INLINE void | SetRadian (Type fRadian) |
| Sets the radian value. (No need for any conversion)
|
|
void | NormalizeRange () |
| Brings the angle into the range of 0 degree - 360 degree.
|
|
xiiAngleTemplate< Type > | GetNormalizedRange () const |
| Returns an equivalent angle with range between 0 degree - 360 degree.
|
|
bool | IsEqualSimple (xiiAngleTemplate< Type > rhs, xiiAngleTemplate< Type > epsilon) const |
| Equality check with epsilon. Simple check without normalization. 360 degree will equal 0 degree, but 720 will not.
|
|
bool | IsEqualNormalized (xiiAngleTemplate< Type > rhs, xiiAngleTemplate< Type > epsilon) const |
| Equality check with epsilon that uses normalized angles. Will recognize 720 degree == 0 degree.
|
|
constexpr xiiAngleTemplate< Type > | operator- () const |
|
constexpr xiiAngleTemplate< Type > | operator+ (xiiAngleTemplate< Type > r) const |
|
constexpr xiiAngleTemplate< Type > | operator- (xiiAngleTemplate< Type > r) const |
|
void | operator+= (xiiAngleTemplate< Type > r) |
|
void | operator-= (xiiAngleTemplate< Type > r) |
|
constexpr bool | operator== (const xiiAngleTemplate< Type > &r) const |
|
constexpr std::partial_ordering | operator<=> (const xiiAngleTemplate< Type > &r) const |
|
|
static constexpr XII_ALWAYS_INLINE Type | DegToRadMultiplier () |
| Returns the constant to multiply with an angle in degree to convert it to radians.
|
|
static constexpr XII_ALWAYS_INLINE Type | RadToDegMultiplier () |
| Returns the constant to multiply with an angle in degree to convert it to radians.
|
|
static constexpr Type | DegToRad (Type f) |
| Converts an angle in degree to radians.
|
|
static constexpr Type | RadToDeg (Type f) |
| Converts an angle in radians to degree.
|
|
static constexpr xiiAngleTemplate< Type > | MakeZero () |
| Returns a zero initialized angle. Same as a default constructed object.
|
|
static constexpr xiiAngleTemplate< Type > | MakeFromDegree (Type fDegree) |
| Creates an instance of xiiAngleTemplate<Type> that was initialized from degree. (Performs a conversion)
|
|
static constexpr xiiAngleTemplate< Type > | MakeFromRadian (Type fRadian) |
| Creates an instance of xiiAngleTemplate<Type> that was initialized from radian. (No need for any conversion)
|
|
static constexpr xiiAngleTemplate< Type > | AngleBetween (xiiAngleTemplate< Type > a, xiiAngleTemplate< Type > b) |
| Computes the smallest angle between the two given angles. The angle will always be a positive value.
|
|
template<typename Type>
class xiiAngleTemplate< Type >
Wrapper class for a safe usage and conversions of angles.
Uses radian internally. Will not automatically keep its range between 0 degree - 360 degree (0 - 2PI) but you can call NormalizeRange to do so.