NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
Core/Constants.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31#include <complex>
32#include <limits>
33
35{
36 constexpr double c = 3.e8;
37 constexpr double e = 2.718281828459045;
38 constexpr double inf = std::numeric_limits<double>::infinity();
39 constexpr double pi = 3.141592653589793238462643383279502884;
40 constexpr double twoPi = 2. * pi;
41 const double nan = std::nan("1");
42 constexpr auto j = std::complex<double>(0, 1); // sqrt(-1) unit imaginary number
43
44 constexpr double DAYS_PER_WEEK = 7;
45 constexpr double MINUTES_PER_HOUR = 60;
46 constexpr double SECONDS_PER_MINUTE = 60;
47 constexpr double MILLISECONDS_PER_SECOND = 1000;
49 constexpr double HOURS_PER_DAY = 24;
52 constexpr double MILLISECONDS_PER_DAY =
55} // namespace nc::constants
Definition: Core/Constants.hpp:35
constexpr auto j
Definition: Core/Constants.hpp:42
constexpr double MILLISECONDS_PER_DAY
Number of milliseconds in a day.
Definition: Core/Constants.hpp:52
constexpr double DAYS_PER_WEEK
Number of days in a week.
Definition: Core/Constants.hpp:44
constexpr double pi
Pi.
Definition: Core/Constants.hpp:39
constexpr double MILLISECONDS_PER_SECOND
Number of milliseconds in a second.
Definition: Core/Constants.hpp:47
constexpr double inf
infinity
Definition: Core/Constants.hpp:38
constexpr double SECONDS_PER_DAY
Number of seconds in a day.
Definition: Core/Constants.hpp:51
constexpr double MINUTES_PER_HOUR
Number of minutes in an hour.
Definition: Core/Constants.hpp:45
constexpr double MINUTES_PER_DAY
Number of minutes in a day.
Definition: Core/Constants.hpp:50
constexpr double SECONDS_PER_WEEK
Number of seconds in a week.
Definition: Core/Constants.hpp:54
constexpr double c
speed of light
Definition: Core/Constants.hpp:36
constexpr double SECONDS_PER_HOUR
Number of seconds in an hour.
Definition: Core/Constants.hpp:48
constexpr double SECONDS_PER_MINUTE
Number of seconds in a minute.
Definition: Core/Constants.hpp:46
constexpr double twoPi
2Pi
Definition: Core/Constants.hpp:40
constexpr double e
eulers number
Definition: Core/Constants.hpp:37
constexpr double HOURS_PER_DAY
Number of hours in a day.
Definition: Core/Constants.hpp:49
const double nan
NaN.
Definition: Core/Constants.hpp:41