WE Core
Loading...
Searching...
No Matches
WECore::CoreMath Namespace Reference

Functions

template<typename T >
bool compareFloatsEqual (T x, T y, T tolerance=std::numeric_limits< T >::epsilon())
 
double linearTodB (double val)
 
double dBToLinear (double val)
 

Variables

constexpr long double LONG_PI {3.14159265358979323846264338327950288}
 
constexpr double DOUBLE_PI {static_cast<double>(LONG_PI)}
 
constexpr long double LONG_TAU {2 * LONG_PI}
 
constexpr double DOUBLE_TAU {static_cast<double>(LONG_TAU)}
 
constexpr long double LONG_E {2.71828182845904523536028747135266250}
 
constexpr double DOUBLE_E {static_cast<double>(LONG_E)}
 
constexpr double MINUS_INF_DB {-200}
 

Detailed Description

Contains generic math related consts and functions.

Function Documentation

◆ compareFloatsEqual()

template<typename T >
bool WECore::CoreMath::compareFloatsEqual ( T x,
T y,
T tolerance = std::numeric_limits<T>::epsilon() )

◆ dBToLinear()

double WECore::CoreMath::dBToLinear ( double val)
inline

◆ linearTodB()

double WECore::CoreMath::linearTodB ( double val)
inline

Variable Documentation

◆ DOUBLE_E

double WECore::CoreMath::DOUBLE_E {static_cast<double>(LONG_E)}
constexpr

Definition at line 42 of file CoreMath.h.

Referenced by WECore::Carve::CarveDSPUnit< T >::_processExponent().

◆ DOUBLE_PI

◆ DOUBLE_TAU

◆ LONG_E

long double WECore::CoreMath::LONG_E {2.71828182845904523536028747135266250}
constexpr

Definition at line 41 of file CoreMath.h.

◆ LONG_PI

long double WECore::CoreMath::LONG_PI {3.14159265358979323846264338327950288}
constexpr

Used for portability since Visual Studio has a different implementation of math.h

Definition at line 35 of file CoreMath.h.

◆ LONG_TAU

long double WECore::CoreMath::LONG_TAU {2 * LONG_PI}
constexpr

Definition at line 38 of file CoreMath.h.

◆ MINUS_INF_DB

double WECore::CoreMath::MINUS_INF_DB {-200}
constexpr

Definition at line 49 of file CoreMath.h.

Referenced by linearTodB().