clan::Angle Class Reference - ClanLib SDK
Description: clan::Angle Class Reference

Public Member Functions | Static Public Member Functions | List of all members
clan::Angle Class Reference
clanCore Math

Angle class. More...

`#include <angle.h>`

## Public Member Functions
| Angle ()
| Constructs a null Angle object.
| Angle (float value, AngleUnit unit)
| Constructs an Angle object.
Angle & | normalize ()
| Converts angle to range [0,360] degrees.
Angle & | normalize_180 ()
| Converts angle to range [-180,180] degrees.
bool | operator!= (const Angle &angle) const
| != operator.
Angle | operator* (const Angle &angle) const
| operator.
Angle | operator* (float value) const
| operator.
void | operator*= (const Angle &angle)
| *= operator.
Angle | operator+ (const Angle &angle) const
| operator.
void | operator+= (const Angle &angle)
| += operator.
Angle | operator- (const Angle &angle) const
| operator.
void | operator-= (const Angle &angle)
| -= operator.
Angle | operator/ (const Angle &angle) const
| / operator.
Angle | operator/ (float value) const
| / operator.
void | operator/= (const Angle &angle)
| /= operator.
bool | operator< (const Angle &angle) const
| < operator.
bool | operator<= (const Angle &angle) const
| < operator.
bool | operator== (const Angle &angle) const
| == operator.
bool | operator> (const Angle &angle) const
| > operator.
bool | operator>= (const Angle &angle) const
| > operator.
void | set_degrees (float value_degrees)
| Set the angle value in degrees.
void | set_radians (float value_radians)
| Set the angle value in radians.
float | to_degrees () const
| Returns the angle as degrees.
float | to_radians () const
| Returns the angle as radians.

## Static Public Member Functions
static Angle | from_degrees (float value)
| From degrees.
static Angle | from_radians (float value)
| From radians.

## Detailed Description

Angle class.

## Constructor & Destructor Documentation

## ◆ Angle() [1/2]

clan::Angle::Angle | ( |  | ) |

Constructs a null Angle object.

Referenced by from_degrees(), from_radians(), normalize(), normalize_180(), operator!=(), operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

## ◆ Angle() [2/2]

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

Constructs an Angle object.

## Member Function Documentation

## ◆ from_degrees()

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

From degrees.

Parameters

  value | = value

Returns
  Angle

References Angle().

## ◆ from_radians()

Angle clan::Angle::from_radians | ( | float | value | ) |
| static

From radians.

Parameters

  value | = value

Returns
  Angle

References Angle().

## ◆ normalize()

Angle & clan::Angle::normalize | ( |  | ) |

Converts angle to range [0,360] degrees.

Returns
  reference to this object

References Angle().

## ◆ normalize_180()

Angle & clan::Angle::normalize_180 | ( |  | ) |

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

Returns
  reference to this object

References Angle().

## ◆ operator!=()

bool clan::Angle::operator!= | ( | const Angle & | angle | ) | const

!= operator.

References Angle(), and clan::angle.

## ◆ operator*() [1/2]

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

- operator.

References Angle(), and clan::angle.

## ◆ operator*() [2/2]

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

- operator.

References Angle().

## ◆ operator*=()

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

*= operator.

References Angle(), and clan::angle.

## ◆ operator+()

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

- operator.

References Angle(), and clan::angle.

## ◆ operator+=()

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

+= operator.

References Angle(), and clan::angle.

## ◆ operator-()

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

- operator.

References Angle(), and clan::angle.

## ◆ operator-=()

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

-= operator.

References Angle(), and clan::angle.

## ◆ operator/() [1/2]

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

/ operator.

References Angle(), and clan::angle.

## ◆ operator/() [2/2]

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

/ operator.

References Angle().

## ◆ operator/=()

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

/= operator.

References Angle(), and clan::angle.

## ◆ operator<()

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

< operator.

References Angle(), and clan::angle.

## ◆ operator<=()

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

< operator.

References Angle(), and clan::angle.

## ◆ operator==()

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

== operator.

References Angle(), and clan::angle.

## ◆ operator>()

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

> operator.

References Angle(), and clan::angle.

## ◆ operator>=()

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

> operator.

References Angle(), and clan::angle.

## ◆ set_degrees()

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

Set the angle value in degrees.

## ◆ set_radians()

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

Set the angle value in radians.

## ◆ to_degrees()

float clan::Angle::to_degrees | ( |  | ) | const

Returns the angle as degrees.

## ◆ to_radians()

float clan::Angle::to_radians | ( |  | ) | const

Returns the angle as radians.

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

- angle.h