A class used to represent arbitrary angles.
More...
#include <Angle.hpp>
A class used to represent arbitrary angles.
constexpr lm::Angle::Angle |
( |
| ) |
|
|
inline |
constexpr lm::Angle::Angle |
( |
double |
angle | ) |
|
|
inlineexplicit |
Create an angle in turns. This is the same as lm::Angle::Turns
- Parameters
-
- Returns
- The resulting Angle.
double lm::Angle::cos |
( |
| ) |
const |
|
inline |
Get the cosinus of the angle.
- Returns
- the cosinus of the angle.
static constexpr Angle lm::Angle::degrees |
( |
double |
angle | ) |
|
|
inlinestatic |
Create an angle from degrees.
- Parameters
-
- Returns
- A new angle with the corresponding value.
constexpr bool lm::Angle::operator!= |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Return false if and only if the two angles are equals.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the angles are not equal, false otherwise.
Angle lm::Angle::operator* |
( |
double |
rhs | ) |
const |
|
inline |
Multiply an angle, and returns a copy of the result.
- Parameters
-
- Returns
- A new angle, resulting of the product.
Angle& lm::Angle::operator*= |
( |
double |
rhs | ) |
|
|
inline |
Multiply an angle with a coefficient.
- Parameters
-
- Returns
- This angle.
constexpr Angle lm::Angle::operator+ |
( |
| ) |
const |
|
inline |
Return the same angle.
- Returns
- The same angle.
Angle lm::Angle::operator+ |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Add an angle, and returns a copy of the result.
- Parameters
-
rhs | The angle to be added. |
- Returns
- A new angle, resulting of the sum.
Add an angle.
- Parameters
-
rhs | The angle to be added. |
- Returns
- This angle.
constexpr Angle lm::Angle::operator- |
( |
| ) |
const |
|
inline |
Return the opposite of an angle.
- Returns
- The opposite of the angle.
Angle lm::Angle::operator- |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Substract an angle, and returns a copy of the result.
- Parameters
-
rhs | The angle to be substracted. |
- Returns
- A new angle, resulting of the difference.
Substract an angle.
- Parameters
-
rhs | The angle to be substracted. |
- Returns
- This angle.
Angle lm::Angle::operator/ |
( |
double |
rhs | ) |
const |
|
inline |
Divide an angle, and returns a copy of the result.
- Parameters
-
- Returns
- A new angle, resulting of the division.
Angle& lm::Angle::operator/= |
( |
double |
rhs | ) |
|
|
inline |
Divide an angle with a coefficient.
- Parameters
-
- Returns
- This angle.
constexpr bool lm::Angle::operator< |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Inferior than operator.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the first angle is inferior to the second one, false otherwise.
constexpr bool lm::Angle::operator<= |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Inferior or equal operator.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the first angle is inferior or equal to the second one, false otherwise.
constexpr bool lm::Angle::operator== |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Return true if and only if the two angles are equals.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the angles are equal, false otherwise.
constexpr bool lm::Angle::operator> |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Superior than operator.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the first angle is superior to the second one, false otherwise.
constexpr bool lm::Angle::operator>= |
( |
const Angle & |
rhs | ) |
const |
|
inline |
Superior or equal operator.
- Parameters
-
rhs | The angle to be compared. |
- Returns
- True if the first angle is superior or equal to the second one, false otherwise.
static constexpr Angle lm::Angle::radians |
( |
double |
angle | ) |
|
|
inlinestatic |
Create an angle from radians.
- Parameters
-
- Returns
- A new angle with the corresponding value.
double lm::Angle::sin |
( |
| ) |
const |
|
inline |
Get the sinus of the angle.
- Returns
- the sinus of the angle.
double lm::Angle::tan |
( |
| ) |
const |
|
inline |
Get the tangent of the angle.
- Returns
- the tangent of the angle.
constexpr double lm::Angle::toDegrees |
( |
| ) |
const |
|
inline |
Get the angle value in degrees.
- Returns
- Angle value in degrees
constexpr double lm::Angle::toRadians |
( |
| ) |
const |
|
inline |
Get the angle value in radians.
- Returns
- Angle value in radians
constexpr double lm::Angle::toTurns |
( |
| ) |
const |
|
inline |
Get the angle value in turns.
- Returns
- Angle value in turns.
static constexpr Angle lm::Angle::turns |
( |
double |
angle | ) |
|
|
inlinestatic |
Create an angle from turns.
- Parameters
-
- Returns
- A new angle with the corresponding value.
The documentation for this class was generated from the following file: