CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Math::TDegree< T > Struct Template Reference

Wrapper class which indicates a given angle value is in degrees. More...

#include <CeresEngine/Math/Angle.hpp>

Public Member Functions

constexpr TDegree ()=default
 
constexpr TDegree (const TDegree &d)=default
 
constexpr TDegreeoperator= (const TDegree &d)=default
 
constexpr TDegree (T d)
 
constexpr TDegree (const TRadian< T > &r)
 
constexpr TDegreeoperator= (const TRadian< T > &r)
 
template<CArithmetic U>
constexpr TDegree (const TDegree< U > &deg)
 
constexpr TDegree wrap () const
 Wraps the angle in [0, 360) range.
 
constexpr const TDegreeoperator+ () const
 
constexpr TDegree operator+ (const TDegree &d) const
 
constexpr TDegreeoperator+= (const TDegree &d)
 
constexpr TDegree operator- () const
 
constexpr TDegree operator- (const TDegree &d) const
 
constexpr TDegreeoperator-= (const TDegree &d)
 
constexpr TDegree operator* (T f) const
 
constexpr TDegreeoperator*= (T f)
 
constexpr TDegree operator/ (T f) const
 
constexpr TDegreeoperator/= (T f)
 
constexpr bool operator< (const TDegree &d) const
 
constexpr bool operator< (T d) const
 
constexpr bool operator<= (const TDegree &d) const
 
constexpr bool operator<= (T d) const
 
constexpr bool operator== (const TDegree &d) const
 
constexpr bool operator== (T d) const
 
constexpr bool operator!= (const TDegree &d) const
 
constexpr bool operator!= (T d) const
 
constexpr bool operator>= (const TDegree &d) const
 
constexpr bool operator>= (T d) const
 
constexpr bool operator> (const TDegree &d) const
 
constexpr bool operator> (T d) const
 

Public Attributes

raw = 0.0
 

Friends

constexpr TDegree operator+ (T lhs, const TDegree &rhs)
 
constexpr TDegree operator- (T lhs, const TDegree &rhs)
 
constexpr TDegree operator* (T lhs, const TDegree &rhs)
 
constexpr TDegree operator/ (T lhs, const TDegree &rhs)
 

Detailed Description

template<CArithmetic T>
struct Math::TDegree< T >

Wrapper class which indicates a given angle value is in degrees.

Note
Degree values are interchangeable with radian values, and conversions will be done automatically between them.

Constructor & Destructor Documentation

◆ TDegree() [1/5]

template<CArithmetic T>
constexpr Math::TDegree< T >::TDegree ( )
constexprdefault

◆ TDegree() [2/5]

template<CArithmetic T>
constexpr Math::TDegree< T >::TDegree ( const TDegree< T > &  d)
constexprdefault

◆ TDegree() [3/5]

template<CArithmetic T>
constexpr Math::TDegree< T >::TDegree ( d)
inlineexplicitconstexpr

◆ TDegree() [4/5]

template<CArithmetic T>
constexpr Math::TDegree< T >::TDegree ( const TRadian< T > &  r)
inlineconstexpr

◆ TDegree() [5/5]

template<CArithmetic T>
template<CArithmetic U>
constexpr Math::TDegree< T >::TDegree ( const TDegree< U > &  deg)
inlineexplicitconstexpr

Member Function Documentation

◆ operator!=() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator!= ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator!=() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator!= ( d) const
inlineconstexpr

◆ operator*()

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::operator* ( f) const
inlineconstexpr

◆ operator*=()

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator*= ( f)
inlineconstexpr

◆ operator+() [1/2]

template<CArithmetic T>
constexpr const TDegree & Math::TDegree< T >::operator+ ( ) const
inlineconstexpr

◆ operator+() [2/2]

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::operator+ ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator+=()

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator+= ( const TDegree< T > &  d)
inlineconstexpr

◆ operator-() [1/2]

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::operator- ( ) const
inlineconstexpr

◆ operator-() [2/2]

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::operator- ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator-=()

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator-= ( const TDegree< T > &  d)
inlineconstexpr

◆ operator/()

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::operator/ ( f) const
inlineconstexpr

◆ operator/=()

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator/= ( f)
inlineconstexpr

◆ operator<() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator< ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator<() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator< ( d) const
inlineconstexpr

◆ operator<=() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator<= ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator<=() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator<= ( d) const
inlineconstexpr

◆ operator=() [1/2]

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator= ( const TDegree< T > &  d)
constexprdefault

◆ operator=() [2/2]

template<CArithmetic T>
constexpr TDegree & Math::TDegree< T >::operator= ( const TRadian< T > &  r)
inlineconstexpr

◆ operator==() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator== ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator==() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator== ( d) const
inlineconstexpr

◆ operator>() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator> ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator>() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator> ( d) const
inlineconstexpr

◆ operator>=() [1/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator>= ( const TDegree< T > &  d) const
inlineconstexpr

◆ operator>=() [2/2]

template<CArithmetic T>
constexpr bool Math::TDegree< T >::operator>= ( d) const
inlineconstexpr

◆ wrap()

template<CArithmetic T>
constexpr TDegree Math::TDegree< T >::wrap ( ) const
inlineconstexpr

Wraps the angle in [0, 360) range.

Friends And Related Symbol Documentation

◆ operator*

template<CArithmetic T>
constexpr TDegree operator* ( lhs,
const TDegree< T > &  rhs 
)
friend

◆ operator+

template<CArithmetic T>
constexpr TDegree operator+ ( lhs,
const TDegree< T > &  rhs 
)
friend

◆ operator-

template<CArithmetic T>
constexpr TDegree operator- ( lhs,
const TDegree< T > &  rhs 
)
friend

◆ operator/

template<CArithmetic T>
constexpr TDegree operator/ ( lhs,
const TDegree< T > &  rhs 
)
friend

Member Data Documentation

◆ raw

template<CArithmetic T>
T Math::TDegree< T >::raw = 0.0

The documentation for this struct was generated from the following file: