4#include <glm/trigonometric.hpp>
23 constexpr Angle() noexcept = default;
29 constexpr explicit
Angle(const
float angle) noexcept
43 result.
radians = glm::radians(angle);
80 constexpr inline void setRadians(
const float angle)
noexcept
135 result.
radians = op1.radians + op2.radians;
143constexpr oe::lit::Angle operator""_deg(
const long double input)
noexcept
151constexpr oe::lit::Angle operator""_deg(
const unsigned long long input)
noexcept
159constexpr oe::lit::Angle operator""_rad(
const long double input)
noexcept
Wrapper and helper to abstract conversions between degree and radian angles.
Definition angle.h:19
float radians
Angle value in radians.
Definition angle.h:121
constexpr void setRadians(const float angle) noexcept
Set angle value in radians.
Definition angle.h:80
constexpr void setDegrees(const float angle) noexcept
Set angle value in degrees.
Definition angle.h:68
constexpr Angle operator-() const noexcept
Apply negation on an angle.
Definition angle.h:111
static constexpr Angle fromRadians(const float angle) noexcept
Create an angle from a value in radians.
Definition angle.h:54
constexpr float getDegrees() const noexcept
Get angle value in degrees.
Definition angle.h:90
constexpr float getRadians() const noexcept
Get angle value in radians.
Definition angle.h:102
static constexpr Angle fromDegrees(const float angle) noexcept
Create an angle from a value in degrees.
Definition angle.h:39
constexpr Angle() noexcept=default
Default constructor to create a "0" angle.