LMMS
Loading...
Searching...
No Matches
MathsFunctions.h File Reference
#include "../water.h"
#include "CarlaUtils.hpp"
#include <algorithm>
#include <cmath>

Go to the source code of this file.

Namespaces

namespace  water

Functions

template<typename Type>
Type water::jmax (const Type a, const Type b)
template<typename Type>
Type water::jmax (const Type a, const Type b, const Type c)
template<typename Type>
Type water::jmax (const Type a, const Type b, const Type c, const Type d)
template<typename Type>
Type water::jmin (const Type a, const Type b)
template<typename Type>
Type water::jmin (const Type a, const Type b, const Type c)
template<typename Type>
Type water::jmin (const Type a, const Type b, const Type c, const Type d)
template<typename Type>
Type water::jmap (Type value0To1, Type targetRangeMin, Type targetRangeMax)
template<typename Type>
Type water::jmap (Type sourceValue, Type sourceRangeMin, Type sourceRangeMax, Type targetRangeMin, Type targetRangeMax)
template<typename Type>
Type water::findMinimum (const Type *data, int numValues)
template<typename Type>
Type water::findMaximum (const Type *values, int numValues)
template<typename Type>
void water::findMinAndMax (const Type *values, int numValues, Type &lowest, Type &highest)
template<typename Type>
Type water::jlimit (const Type lowerLimit, const Type upperLimit, const Type valueToConstrain) noexcept
template<typename Type>
bool water::isPositiveAndBelow (Type valueToTest, Type upperLimit) noexcept
template<>
bool water::isPositiveAndBelow (const int valueToTest, const int upperLimit) noexcept
template<typename Type>
bool water::isPositiveAndNotGreaterThan (Type valueToTest, Type upperLimit) noexcept
template<>
bool water::isPositiveAndNotGreaterThan (const int valueToTest, const int upperLimit) noexcept
template<typename Type>
void water::swapVariables (Type &variable1, Type &variable2)
template<typename Type1>
void water::ignoreUnused (const Type1 &) noexcept
template<typename Type1, typename Type2>
void water::ignoreUnused (const Type1 &, const Type2 &) noexcept
template<typename Type1, typename Type2, typename Type3>
void water::ignoreUnused (const Type1 &, const Type2 &, const Type3 &) noexcept
template<typename Type1, typename Type2, typename Type3, typename Type4>
void water::ignoreUnused (const Type1 &, const Type2 &, const Type3 &, const Type4 &) noexcept
template<typename Type, size_t N>
size_t water::numElementsInArray (Type(&array)[N])
template<typename Type>
Type water::water_hypot (Type a, Type b) noexcept
template<>
float water::water_hypot (float a, float b) noexcept
int64 water::abs64 (const int64 n) noexcept
float water::degreesToRadians (float degrees) noexcept
double water::degreesToRadians (double degrees) noexcept
float water::radiansToDegrees (float radians) noexcept
double water::radiansToDegrees (double radians) noexcept
template<typename NumericType>
bool water::water_isfinite (NumericType) noexcept
template<>
bool water::water_isfinite (float value) noexcept
template<>
bool water::water_isfinite (double value) noexcept
template<typename FloatType>
int water::roundToInt (const FloatType value) noexcept
int water::roundToInt (int value) noexcept
int water::roundToIntAccurate (double value) noexcept
int water::roundDoubleToInt (double value) noexcept
int water::roundFloatToInt (float value) noexcept
template<typename IntegerType>
bool water::isPowerOfTwo (IntegerType value)
int water::nextPowerOfTwo (int n) noexcept
int water::findHighestSetBit (uint32 n) noexcept
int water::countNumberOfBits (uint32 n) noexcept
int water::countNumberOfBits (uint64 n) noexcept
template<typename IntegerType>
IntegerType water::negativeAwareModulo (IntegerType dividend, const IntegerType divisor) noexcept
template<typename NumericType>
NumericType water::square (NumericType n) noexcept
void water::writeLittleEndianBitsInBuffer (void *targetBuffer, uint32 startBit, uint32 numBits, uint32 value) noexcept
uint32 water::readLittleEndianBitsInBuffer (const void *sourceBuffer, uint32 startBit, uint32 numBits) noexcept

Variables

const double water::double_Pi = 3.1415926535897932384626433832795
const float water::float_Pi = 3.14159265358979323846f