mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
constants.hpp File Reference
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  mx
 The mxlib c++ namespace.
 
namespace  mx::math
 

Macros

#define MX_INTERNAL_PI_100    ( 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 )
 
#define MX_INTERNAL_ROOT2_100    ( 1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727 )
 
#define MX_INTERNAL_LN2_100    ( 0.6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875 )
 

Functions

template<typename T >
constexprmx::math::pi ()
 Get the value of pi.
 
template<>
constexpr float mx::math::pi< float > ()
 
template<>
constexpr double mx::math::pi< double > ()
 
template<>
constexpr long double mx::math::pi< long double > ()
 
template<typename T >
constexprmx::math::two_pi ()
 Get the value of 2pi.
 
template<>
constexpr float mx::math::two_pi< float > ()
 
template<>
constexpr double mx::math::two_pi< double > ()
 
template<>
constexpr long double mx::math::two_pi< long double > ()
 
template<typename T >
constexprmx::math::half_pi ()
 Get the value of pi/2.
 
template<>
constexpr float mx::math::half_pi< float > ()
 
template<>
constexpr double mx::math::half_pi< double > ()
 
template<>
constexpr long double mx::math::half_pi< long double > ()
 
template<typename T >
constexprmx::math::rad2deg ()
 Get the value of 180/pi.
 
template<>
constexpr float mx::math::rad2deg< float > ()
 
template<>
constexpr double mx::math::rad2deg< double > ()
 
template<>
constexpr long double mx::math::rad2deg< long double > ()
 
template<typename T >
constexprmx::math::root_two ()
 Get the value of sqrt(2)
 
template<>
constexpr float mx::math::root_two< float > ()
 
template<>
constexpr double mx::math::root_two< double > ()
 
template<>
constexpr long double mx::math::root_two< long double > ()
 
template<typename T >
constexprmx::math::ln_two ()
 Get the value of ln(2)
 
template<>
constexpr float mx::math::ln_two< float > ()
 
template<>
constexpr double mx::math::ln_two< double > ()
 
template<>
constexpr long double mx::math::ln_two< long double > ()
 
template<typename T >
constexprmx::math::third ()
 Get the value of 1/3.
 
template<>
constexpr float mx::math::third< float > ()
 
template<>
constexpr double mx::math::third< double > ()
 
template<>
constexpr long double mx::math::third< long double > ()
 
template<typename floatT >
constexpr floatT mx::math::five_thirds ()
 Return 5/3 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::five_sixths ()
 Return 5/6 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::eleven_thirds ()
 Return 11/3 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::eleven_sixths ()
 Return 11/6 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::six_fifths ()
 Return 6/5 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::three_fifths ()
 Return 3/5 in the specified precision.
 
template<typename floatT >
constexpr floatT mx::math::seventeen_thirds ()
 Return 17/3 in the specified precision.
 

Macro Definition Documentation

◆ MX_INTERNAL_LN2_100

#define MX_INTERNAL_LN2_100    ( 0.6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875 )

Definition at line 45 of file constants.hpp.

◆ MX_INTERNAL_PI_100

#define MX_INTERNAL_PI_100    ( 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 )

Definition at line 41 of file constants.hpp.

◆ MX_INTERNAL_ROOT2_100

#define MX_INTERNAL_ROOT2_100    ( 1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727 )

Definition at line 43 of file constants.hpp.