Magnum::Math::Literals::AngleLiterals namespace new in Git master

Math angle literals.

See the Literals namespace and the Deg and Rad classes for more information.

Functions

auto operator""_deg(long double value) -> Deg<Double> constexpr
Double-precision degree value literal.
auto operator""_degf(long double value) -> Deg<Float> constexpr
Single-precision degree value literal.
auto operator""_rad(long double value) -> Rad<Double> constexpr
Double-precision radian value literal.
auto operator""_radf(long double value) -> Rad<Float> constexpr
Single-precision radian value literal.

Function documentation

Deg<Double> Magnum::Math::Literals::AngleLiterals::operator""_deg(long double value) constexpr

Double-precision degree value literal.

Example usage:

using namespace Math::Literals;
Double cos1 = Math::cos(60.0_deg);  // cos1 = 0.5
Double cos2 = Math::cos(1.047_rad); // cos2 = 0.5

Deg<Float> Magnum::Math::Literals::AngleLiterals::operator""_degf(long double value) constexpr

Single-precision degree value literal.

Example usage:

using namespace Math::Literals;
Float tan1 = Math::tan(60.0_degf);  // tan1 = 1.732f
Float tan2 = Math::tan(1.047_radf); // tan2 = 1.732f

Rad<Double> Magnum::Math::Literals::AngleLiterals::operator""_rad(long double value) constexpr

Double-precision radian value literal.

See operator""_deg() for more information.

Rad<Float> Magnum::Math::Literals::AngleLiterals::operator""_radf(long double value) constexpr

Single-precision radian value literal.

See operator""_degf() for more information.