Variables | |
static const double | sqrt2 = 1.4142135623730950488 |
static const double | sqrt3 = 1.7320508075688772935 |
static const double | two_pi = 6.28318530717958647688 |
static const double | pi = 3.14159265358979323846 |
static const double | pi_2 = 1.57079632679489661922 |
static const double | pi_3 = 1.04719755119659774614 |
static const double | inv_pi = 0.31830988618379067154 |
static const double | deg2rad = 0.01745329251994329576 |
static const double | rad2deg = 57.29577951308232087721 |
static const double | e = 2.71828182845904523536 |
static const Mat9d | unit_matrix |
This is a namespace that declares universal physical constants used in a variety of places in this application. Constants are not restricted to being simply scalars, for example ; but may also be defined as vectors or matrices, for example, the unit matrix ).
A typical usage in the application code could, for example, compute the area of a circle given the input dimension radius
. In other words to compute the area of a circle ; a code fragment in the application may look like this:
const double area_of_a_circle (const double radius) { return constant::pi * radius * radius; }
Similarly for the diameter of a circle we could write:
const double diameter_of_a_circle (const double radius) { return constant::pi * 2 * radius; }
const double constant::deg2rad = 0.01745329251994329576 [static] |
Numerical value of .
const double constant::e = 2.71828182845904523536 [static] |
Numerical value of .
const double constant::inv_pi = 0.31830988618379067154 [static] |
Numerical value of .
const double constant::pi = 3.14159265358979323846 [static] |
Numerical value of .
const double constant::pi_2 = 1.57079632679489661922 [static] |
Numerical value of .
const double constant::pi_3 = 1.04719755119659774614 [static] |
Numerical value of .
const double constant::rad2deg = 57.29577951308232087721 [static] |
Numerical value of .
const double constant::sqrt2 = 1.4142135623730950488 [static] |
Numerical value of .
const double constant::sqrt3 = 1.7320508075688772935 [static] |
Numerical value of .
const double constant::two_pi = 6.28318530717958647688 [static] |
Numerical value of .
const Mat9d constant::unit_matrix [static] |
Mat9d(1., 0., 0., 0., 1., 0., 0., 0., 1.)
The unit matrix .