Angle class. More...

#include <angle.h>

Public Member Functions

 Angle ()
 Constructs a null Angle object. More...
 
 Angle (float value, AngleUnit unit)
 Constructs an Angle object. More...
 
Anglenormalize ()
 Converts angle to range [0,360] degrees. More...
 
Anglenormalize_180 ()
 Converts angle to range [-180,180] degrees. More...
 
bool operator!= (const Angle &angle) const
 != operator. More...
 
Angle operator* (const Angle &angle) const
 
  • operator.
More...
 
Angle operator* (float value) const
 
  • operator.
More...
 
void operator*= (const Angle &angle)
 *= operator. More...
 
Angle operator+ (const Angle &angle) const
 
  • operator.
More...
 
void operator+= (const Angle &angle)
 += operator. More...
 
Angle operator- (const Angle &angle) const
 
  • operator.
More...
 
void operator-= (const Angle &angle)
 -= operator. More...
 
Angle operator/ (const Angle &angle) const
 / operator. More...
 
Angle operator/ (float value) const
 / operator. More...
 
void operator/= (const Angle &angle)
 /= operator. More...
 
bool operator< (const Angle &angle) const
 < operator. More...
 
bool operator<= (const Angle &angle) const
 < operator. More...
 
bool operator== (const Angle &angle) const
 == operator. More...
 
bool operator> (const Angle &angle) const
 

operator.

More...
 
bool operator>= (const Angle &angle) const
 

operator.

More...
 
void set_degrees (float value_degrees)
 Set the angle value in degrees. More...
 
void set_radians (float value_radians)
 Set the angle value in radians. More...
 
float to_degrees () const
 Returns the angle as degrees. More...
 
float to_radians () const
 Returns the angle as radians. More...
 

Static Public Member Functions

static Angle from_degrees (float value)
 From degrees. More...
 
static Angle from_radians (float value)
 From radians. More...
 

Detailed Description

Angle class.

Constructor & Destructor Documentation

clan::Angle::Angle ( )

Constructs a null Angle object.

clan::Angle::Angle ( float  value,
AngleUnit  unit 
)

Constructs an Angle object.

Member Function Documentation

static Angle clan::Angle::from_degrees ( float  value)
static

From degrees.

Parameters
value= value
Returns
Angle
static Angle clan::Angle::from_radians ( float  value)
static

From radians.

Parameters
value= value
Returns
Angle
Angle& clan::Angle::normalize ( )

Converts angle to range [0,360] degrees.

Returns
reference to this object
Angle& clan::Angle::normalize_180 ( )

Converts angle to range [-180,180] degrees.

Returns
reference to this object
bool clan::Angle::operator!= ( const Angle angle) const

!= operator.

Angle clan::Angle::operator* ( const Angle angle) const

  • operator.

Angle clan::Angle::operator* ( float  value) const

  • operator.

void clan::Angle::operator*= ( const Angle angle)

*= operator.

Angle clan::Angle::operator+ ( const Angle angle) const

  • operator.

void clan::Angle::operator+= ( const Angle angle)

+= operator.

Angle clan::Angle::operator- ( const Angle angle) const

  • operator.

void clan::Angle::operator-= ( const Angle angle)

-= operator.

Angle clan::Angle::operator/ ( const Angle angle) const

/ operator.

Angle clan::Angle::operator/ ( float  value) const

/ operator.

void clan::Angle::operator/= ( const Angle angle)

/= operator.

bool clan::Angle::operator< ( const Angle angle) const

< operator.

bool clan::Angle::operator<= ( const Angle angle) const

< operator.

bool clan::Angle::operator== ( const Angle angle) const

== operator.

bool clan::Angle::operator> ( const Angle angle) const

operator.

bool clan::Angle::operator>= ( const Angle angle) const

operator.

void clan::Angle::set_degrees ( float  value_degrees)

Set the angle value in degrees.

void clan::Angle::set_radians ( float  value_radians)

Set the angle value in radians.

float clan::Angle::to_degrees ( ) const

Returns the angle as degrees.

float clan::Angle::to_radians ( ) const

Returns the angle as radians.


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