Not Enough Math
Lightweight zero-dependency C++ math library
Loading...
Searching...
No Matches
consts.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <concepts>
4
5
namespace
nem
6
{
7
template
<std::
float
ing_po
int
T>
constexpr
T
SQRT2
= (T)1.414213562373095;
8
template
<std::
float
ing_po
int
T>
constexpr
T
SQRT3
= (T)1.73205080756887;
9
template
<std::
float
ing_po
int
T>
constexpr
T
SQRT5
= (T)2.236067977499789;
10
template
<std::
float
ing_po
int
T>
constexpr
T
PI
= (T)3.141592653589793;
11
template
<std::
float
ing_po
int
T>
constexpr
T
HALF_PI
= (T)
nem::PI<T>
* (T)0.5;
12
template
<std::
float
ing_po
int
T>
constexpr
T
QUARTER_PI
= (T)
nem::PI<T>
* (T)0.25;
13
template
<std::
float
ing_po
int
T>
constexpr
T
TWO_PI
= (T)
nem::PI<T>
* (T)2.0;
14
template
<std::
float
ing_po
int
T>
constexpr
T
E
= (T)2.718281828459045;
15
template
<std::
float
ing_po
int
T>
constexpr
T
ESQR
=
nem::E<T>
*
nem::E<T>
;
16
template
<std::
float
ing_po
int
T>
constexpr
T
PHI
= (T)1.618033988749894;
17
template
<std::
float
ing_po
int
T>
constexpr
T
DEG_TO_RAD
=
nem::TWO_PI<T>
/ (T)360.0;
18
template
<std::
float
ing_po
int
T>
constexpr
T
RAD_TO_DEG
= (T)1.0 /
nem::DEG_TO_RAD<T>
;
19
template
<std::
float
ing_po
int
T>
constexpr
T
LN2
= (T)0.6931471805599453094;
20
22
template
<std::
float
ing_po
int
T>
constexpr
T
LOG2E
= (T)1.44269504088896340735992;
23
}
nem
Definition
config.hpp:16
nem::QUARTER_PI
constexpr T QUARTER_PI
Definition
consts.hpp:12
nem::TWO_PI
constexpr T TWO_PI
Definition
consts.hpp:13
nem::LOG2E
constexpr T LOG2E
log(2, e)
Definition
consts.hpp:22
nem::SQRT2
constexpr T SQRT2
Definition
consts.hpp:7
nem::PI
constexpr T PI
Definition
consts.hpp:10
nem::LN2
constexpr T LN2
Definition
consts.hpp:19
nem::RAD_TO_DEG
constexpr T RAD_TO_DEG
Definition
consts.hpp:18
nem::SQRT3
constexpr T SQRT3
Definition
consts.hpp:8
nem::HALF_PI
constexpr T HALF_PI
Definition
consts.hpp:11
nem::SQRT5
constexpr T SQRT5
Definition
consts.hpp:9
nem::ESQR
constexpr T ESQR
Definition
consts.hpp:15
nem::DEG_TO_RAD
constexpr T DEG_TO_RAD
Definition
consts.hpp:17
nem::PHI
constexpr T PHI
Definition
consts.hpp:16
nem::E
constexpr T E
Definition
consts.hpp:14
nem
include
consts.hpp
Generated by
1.12.0