|
| std::ostream & | linPrecision (std::ostream &stream) |
| | Sets number of decimal places for linear (sample) values.
|
| |
| std::ostream & | dbPrecision (std::ostream &stream) |
| | Sets number of decimal places for values in decibels.
|
| |
| std::ostream & | secPrecision (std::ostream &stream) |
| | Sets number of decimal places for values in seconds.
|
| |
| std::ostream & | hzPrecision (std::ostream &stream) |
| | Sets number of decimal places for values in hertz.
|
| |
| std::ostream & | radPrecision (std::ostream &stream) |
| | Sets number of decimal places for values in radians.
|
| |
| template<typename NumericType > |
| NumericType | clamp (const NumericType &value, const NumericType &low, const NumericType &high) |
| | std::clamp() replacement for C++11
|
| |
| template<typename SampleType > |
| static SampleType | decibelsToRatio (SampleType valueDb) |
| | Converts dB to linear value (ratio)
|
| |
| template<typename SampleType > |
| static SampleType | ratioToDecibels (SampleType valueLinear) |
| | Converts linear value (ratio) to dB.
|
| |
| template<typename SampleType > |
| static SampleType | floatsEqual (SampleType a, SampleType b, SampleType epsilon=(SampleType) 1e-8) |
| | Compares two floating point numbers within a given tolerance.
|
| |
| template<typename SampleType > |
| static SampleType | floatsNotEqual (SampleType a, SampleType b, SampleType epsilon=(SampleType) 1e-8) |
| | Compares two floating point numbers within a given tolerance.
|
| |
| template<typename SampleType > |
| static size_t | roundToSizeT (SampleType x) |
| | Rounds a floating point value to a size_t value.
|
| |
| template<typename SampleType > |
| SampleType | wrapPhase (const SampleType phaseRadians) |
| | Keeps phase in 0..twoPi range.
|
| |
| static bool | isAbsolutePath (const std::string &path) |
| | Checks if the provided file path is absolute.
|
| |
| static std::string | toAbsolutePath (const std::string &path) |
| | Converts path to absolute, if it's relative @deials Relative paths are resolved based on a provided --data-root-path CLI argument
|
| |
| template<typename KeyType , typename ValueType > |
| static bool | contains (const std::unordered_map< KeyType, ValueType > &map, const KeyType &key) |
| | std::unordered_map::contains() replacement for C++11
|
| |
| template<typename ObjectType , typename... Args> |
| std::unique_ptr< ObjectType > | make_unique (Args &&... args) |
| | std::make_unique() replacement for C++11
|
| |
|
| static const char * | hartAsciiArt = "88 \n88 ,d \n88 88 \n88,dPPYba, ,adPPYYba, 8b,dPPYba, MM88MMM\n88P' \"8a \"\" `Y8 88P' \"Y8 88 \n88 88 ,adPPPPP88 88 88 \n88 88 88, ,88 88 88, \n88 88 `\"8bbdP\"Y8 88 \"Y888\n" |
| |
| static const char * | passAsciiArt = "8b,dPPYba, ,adPPYYba, ,adPPYba, ,adPPYba,\n88P' \"8a \"\" `Y8 I8[ \"\" I8[ \"\"\n88 d8 ,adPPPPP88 `\"Y8ba, `\"Y8ba, \n88b, ,a8\" 88, ,88 aa ]8I aa ]8I\n88`YbbdP\"' `\"8bbdP\"Y8 `\"YbbdP\"' `\"YbbdP\"'\n88 \n88\n" |
| |
| static const char * | failAsciiArt = " ad88 88 88\n d8\" \"\" 88\n 88 88\nMM88MMM ,adPPYYba, 88 88\n 88 \"\" `Y8 88 88\n 88 ,adPPPPP88 88 88\n 88 88, ,88 88 88\n 88 `\"8bbdP\"Y8 88 88\n" |
| |
| constexpr double | inf = std::numeric_limits<double>::infinity() |
| | Infinity.
|
| |
| constexpr double | oo = inf |
| | Infinity.
|
| |
| constexpr double | pi = 3.14159265358979323846 |
| | pi
|
| |
| constexpr double | twoPi = 2.0 * pi |
| | 2 * pi
|
| |
| constexpr double | halfPi = pi / 2.0 |
| | pi / 2
|
| |