template<class T>
Magnum::Math::Constants struct

Numeric constants.

Contents

Public static functions

static auto pi() -> T constexpr
Pi.
static auto piHalf() -> T constexpr
Half of a pi.
static auto piQuarter() -> T constexpr
Quarter of a pi.
static auto tau() -> T constexpr
Tau.
static auto e() -> T constexpr
Euler's number.
static auto sqrt2() -> T constexpr
Square root of 2.
static auto sqrt3() -> T constexpr
Square root of 3.
static auto nan() -> T constexpr
Quiet NaN.
static auto inf() -> T constexpr
Positive infinity.

Function documentation

template<class T>
static T Magnum::Math::Constants<T>::pi() constexpr

Pi.

template<class T>
static T Magnum::Math::Constants<T>::piHalf() constexpr

Half of a pi.

template<class T>
static T Magnum::Math::Constants<T>::piQuarter() constexpr

Quarter of a pi.

template<class T>
static T Magnum::Math::Constants<T>::tau() constexpr

Tau.

Or two pi. See the Tau manifesto.

template<class T>
static T Magnum::Math::Constants<T>::e() constexpr

Euler's number.

template<class T>
static T Magnum::Math::Constants<T>::nan() constexpr

Quiet NaN.

template<class T>
static T Magnum::Math::Constants<T>::inf() constexpr

Positive infinity.