Wrapper and helper to abstract conversions between degree and radian angles.
More...
#include <OxygenEngine/util/angle.h>
|
constexpr | Angle () noexcept=default |
| Default constructor to create a "0" angle.
|
|
constexpr | Angle (const float angle) noexcept |
| Create an Angle from a value.
|
|
constexpr void | setDegrees (const float angle) noexcept |
| Set angle value in degrees.
|
|
constexpr void | setRadians (const float angle) noexcept |
| Set angle value in radians.
|
|
constexpr float | getDegrees () const noexcept |
| Get angle value in degrees.
|
|
constexpr float | getRadians () const noexcept |
| Get angle value in radians.
|
|
constexpr Angle | operator- () const noexcept |
| Apply negation on an angle.
|
|
|
static constexpr Angle | fromDegrees (const float angle) noexcept |
| Create an angle from a value in degrees.
|
|
static constexpr Angle | fromRadians (const float angle) noexcept |
| Create an angle from a value in radians.
|
|
|
float | radians = 0.f |
| Angle value in radians.
|
|
Wrapper and helper to abstract conversions between degree and radian angles.
You can use litterals to create angles from numeric values:
Wrapper and helper to abstract conversions between degree and radian angles.
Definition angle.h:19
◆ Angle()
constexpr oe::lit::Angle::Angle |
( |
const float |
angle | ) |
|
|
inlineexplicitconstexprnoexcept |
Create an Angle from a value.
- Parameters
-
◆ fromDegrees()
static constexpr Angle oe::lit::Angle::fromDegrees |
( |
const float |
angle | ) |
|
|
inlinestaticconstexprnoexcept |
Create an angle from a value in degrees.
- Parameters
-
- Returns
- Angle with value converted
◆ fromRadians()
static constexpr Angle oe::lit::Angle::fromRadians |
( |
const float |
angle | ) |
|
|
inlinestaticconstexprnoexcept |
Create an angle from a value in radians.
- Parameters
-
- Returns
- Angle with value converted
◆ getDegrees()
constexpr float oe::lit::Angle::getDegrees |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get angle value in degrees.
- Returns
- angle in degrees
◆ getRadians()
constexpr float oe::lit::Angle::getRadians |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get angle value in radians.
- Note
- Mainly here for completeness with getDegrees()
- Returns
- angle in radians
◆ operator-()
constexpr Angle oe::lit::Angle::operator- |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Apply negation on an angle.
- Returns
- Opposite angle
◆ setDegrees()
constexpr void oe::lit::Angle::setDegrees |
( |
const float |
angle | ) |
|
|
inlineconstexprnoexcept |
Set angle value in degrees.
- Parameters
-
◆ setRadians()
constexpr void oe::lit::Angle::setRadians |
( |
const float |
angle | ) |
|
|
inlineconstexprnoexcept |
Set angle value in radians.
- Note
- Mainly here for completeness with setDegrees()
- Parameters
-
The documentation for this struct was generated from the following file:
- OxygenEngine/util/angle.h