Not Enough Math
Lightweight zero-dependency C++ math library
Loading...
Searching...
No Matches
consts.hpp File Reference
#include <concepts>

Go to the source code of this file.

Namespaces

namespace  nem
 

Variables

template<std::floating_point T>
constexpr T nem::SQRT2 = (T)1.414213562373095
 
template<std::floating_point T>
constexpr T nem::SQRT3 = (T)1.73205080756887
 
template<std::floating_point T>
constexpr T nem::SQRT5 = (T)2.236067977499789
 
template<std::floating_point T>
constexpr T nem::PI = (T)3.141592653589793
 
template<std::floating_point T>
constexpr T nem::HALF_PI = (T)nem::PI<T> * (T)0.5
 
template<std::floating_point T>
constexpr T nem::QUARTER_PI = (T)nem::PI<T> * (T)0.25
 
template<std::floating_point T>
constexpr T nem::TWO_PI = (T)nem::PI<T> * (T)2.0
 
template<std::floating_point T>
constexpr T nem::E = (T)2.718281828459045
 
template<std::floating_point T>
constexpr T nem::ESQR = nem::E<T> * nem::E<T>
 
template<std::floating_point T>
constexpr T nem::PHI = (T)1.618033988749894
 
template<std::floating_point T>
constexpr T nem::DEG_TO_RAD = nem::TWO_PI<T> / (T)360.0
 
template<std::floating_point T>
constexpr T nem::RAD_TO_DEG = (T)1.0 / nem::DEG_TO_RAD<T>
 
template<std::floating_point T>
constexpr T nem::LN2 = (T)0.6931471805599453094
 
template<std::floating_point T>
constexpr T nem::LOG2E = (T)1.44269504088896340735992
 log(2, e)