|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Go to the source code of this file.
Classes | |
| struct | juce::MathConstants< FloatType > |
| Commonly used mathematical constants. More... | |
| class | juce::Tolerance< Type > |
| A class encapsulating both relative and absolute tolerances for use in floating-point comparisons. More... | |
Namespaces | |
| namespace | juce |
| JUCE Namespace. | |
| namespace | juce::TypeHelpers |
| This namespace contains a few template classes for helping work out class type variations. | |
Macros | |
| #define | JUCE_UNDENORMALISE(x) |
| This macro can be applied to a float variable to check whether it contains a denormalised value, and to normalise it if necessary. | |
Typedefs | |
| using | juce::int8 = signed char |
| A platform-independent 8-bit signed integer type. | |
| using | juce::uint8 = unsigned char |
| A platform-independent 8-bit unsigned integer type. | |
| using | juce::int16 = signed short |
| A platform-independent 16-bit signed integer type. | |
| using | juce::uint16 = unsigned short |
| A platform-independent 16-bit unsigned integer type. | |
| using | juce::int32 = signed int |
| A platform-independent 32-bit signed integer type. | |
| using | juce::uint32 = unsigned int |
| A platform-independent 32-bit unsigned integer type. | |
| using | juce::int64 = long long |
| A platform-independent 64-bit integer type. | |
| using | juce::uint64 = unsigned long long |
| A platform-independent 64-bit unsigned integer type. | |
| using | juce::pointer_sized_int = int |
| A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. | |
| using | juce::pointer_sized_uint = unsigned int |
| An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. | |
Functions | |
| template<typename... Types> | |
| void | juce::ignoreUnused (Types &&...) noexcept |
| Handy function for avoiding unused variables warning. | |
| template<typename Type , size_t N> | |
| constexpr int | juce::numElementsInArray (Type(&)[N]) noexcept |
| Handy function for getting the number of elements in a simple const C array. | |
| template<typename Type > | |
| Type | juce::juce_hypot (Type a, Type b) noexcept |
| Using juce_hypot is easier than dealing with the different types of hypot function that are provided by the various platforms and compilers. | |
| template<typename FloatType > | |
| constexpr FloatType | juce::degreesToRadians (FloatType degrees) noexcept |
| Converts an angle in degrees to radians. | |
| template<typename FloatType > | |
| constexpr FloatType | juce::radiansToDegrees (FloatType radians) noexcept |
| Converts an angle in radians to degrees. | |
| template<typename NumericType > | |
| bool | juce::juce_isfinite (NumericType value) noexcept |
| The isfinite() method seems to vary between platforms, so this is a platform-independent function for it. | |
| template<typename Type > | |
| constexpr bool | juce::exactlyEqual (Type a, Type b) |
| Equivalent to operator==, but suppresses float-equality warnings. | |
| template<typename Type , std::enable_if_t< std::is_floating_point_v< Type >, int > = 0> | |
| constexpr bool | juce::approximatelyEqual (Type a, Type b, Tolerance< Type > tolerance=Tolerance< Type >{} .withAbsolute(std::numeric_limits< Type >::min()) .withRelative(std::numeric_limits< Type >::epsilon())) |
| Returns true if the two floating-point numbers are approximately equal. | |
| template<typename Type , std::enable_if_t<! std::is_floating_point_v< Type >, int > = 0> | |
| constexpr bool | juce::approximatelyEqual (Type a, Type b) |
| Special case for non-floating-point types that returns true if both are exactly equal. | |
| template<typename FloatType > | |
| FloatType | juce::nextFloatUp (FloatType value) noexcept |
| Returns the next representable value by FloatType in the direction of the largest representable value. | |
| template<typename FloatType > | |
| FloatType | juce::nextFloatDown (FloatType value) noexcept |
| Returns the next representable value by FloatType in the direction of the lowest representable value. | |
| template<typename Type > | |
| constexpr Type | juce::jmax (Type a, Type b) |
| Returns the larger of two values. | |
| template<typename Type > | |
| constexpr Type | juce::jmax (Type a, Type b, Type c) |
| Returns the larger of three values. | |
| template<typename Type > | |
| constexpr Type | juce::jmax (Type a, Type b, Type c, Type d) |
| Returns the larger of four values. | |
| template<typename Type > | |
| constexpr Type | juce::jmin (Type a, Type b) |
| Returns the smaller of two values. | |
| template<typename Type > | |
| constexpr Type | juce::jmin (Type a, Type b, Type c) |
| Returns the smaller of three values. | |
| template<typename Type > | |
| constexpr Type | juce::jmin (Type a, Type b, Type c, Type d) |
| Returns the smaller of four values. | |
| template<typename Type > | |
| constexpr Type | juce::jmap (Type value0To1, Type targetRangeMin, Type targetRangeMax) |
| Remaps a normalised value (between 0 and 1) to a target range. | |
| template<typename Type > | |
| Type | juce::jmap (Type sourceValue, Type sourceRangeMin, Type sourceRangeMax, Type targetRangeMin, Type targetRangeMax) |
| Remaps a value from a source range to a target range. | |
| template<typename Type > | |
| Type | juce::mapToLog10 (Type value0To1, Type logRangeMin, Type logRangeMax) |
| Remaps a normalised value (between 0 and 1) to a logarithmic target range. | |
| template<typename Type > | |
| Type | juce::mapFromLog10 (Type valueInLogRange, Type logRangeMin, Type logRangeMax) |
| Remaps a logarithmic value in a target range to a normalised value (between 0 and 1). | |
| template<typename Type , typename Size > | |
| Type | juce::findMinimum (const Type *data, Size numValues) |
| Scans an array of values, returning the minimum value that it contains. | |
| template<typename Type , typename Size > | |
| Type | juce::findMaximum (const Type *values, Size numValues) |
| Scans an array of values, returning the maximum value that it contains. | |
| template<typename Type > | |
| void | juce::findMinAndMax (const Type *values, int numValues, Type &lowest, Type &highest) |
| Scans an array of values, returning the minimum and maximum values that it contains. | |
| template<typename Type > | |
| Type | juce::jlimit (Type lowerLimit, Type upperLimit, Type valueToConstrain) noexcept |
| Constrains a value to keep it within a given range. | |
| template<typename Type1 , typename Type2 > | |
| bool | juce::isPositiveAndBelow (Type1 valueToTest, Type2 upperLimit) noexcept |
| Returns true if a value is at least zero, and also below a specified upper limit. | |
| template<typename Type > | |
| bool | juce::isPositiveAndBelow (int valueToTest, Type upperLimit) noexcept |
| template<typename Type1 , typename Type2 > | |
| bool | juce::isPositiveAndNotGreaterThan (Type1 valueToTest, Type2 upperLimit) noexcept |
| Returns true if a value is at least zero, and also less than or equal to a specified upper limit. | |
| template<typename Type > | |
| bool | juce::isPositiveAndNotGreaterThan (int valueToTest, Type upperLimit) noexcept |
| template<typename Type > | |
| bool | juce::isWithin (Type a, Type b, Type tolerance) noexcept |
| Computes the absolute difference between two values and returns true if it is less than or equal to a given tolerance, otherwise it returns false. | |
| template<typename FloatType > | |
| int | juce::roundToInt (const FloatType value) noexcept |
| Fast floating-point-to-integer conversion. | |
| int | juce::roundToInt (int value) noexcept |
| int | juce::roundToIntAccurate (double value) noexcept |
| Fast floating-point-to-integer conversion. | |
| template<typename FloatType > | |
| unsigned int | juce::truncatePositiveToUnsignedInt (FloatType value) noexcept |
| Truncates a positive floating-point number to an unsigned int. | |
| template<typename IntegerType > | |
| constexpr bool | juce::isPowerOfTwo (IntegerType value) |
| Returns true if the specified integer is a power-of-two. | |
| int | juce::nextPowerOfTwo (int n) noexcept |
| Returns the smallest power-of-two which is equal to or greater than the given integer. | |
| int | juce::findHighestSetBit (uint32 n) noexcept |
| Returns the index of the highest set bit in a (non-zero) number. | |
| constexpr int | juce::countNumberOfBits (uint32 n) noexcept |
| Returns the number of bits in a 32-bit integer. | |
| constexpr int | juce::countNumberOfBits (uint64 n) noexcept |
| Returns the number of bits in a 64-bit integer. | |
| template<typename IntegerType > | |
| IntegerType | juce::negativeAwareModulo (IntegerType dividend, const IntegerType divisor) noexcept |
| Performs a modulo operation, but can cope with the dividend being negative. | |
| template<typename NumericType > | |
| constexpr NumericType | juce::square (NumericType n) noexcept |
| Returns the square of its argument. | |
| void | juce::writeLittleEndianBitsInBuffer (void *targetBuffer, uint32 startBit, uint32 numBits, uint32 value) noexcept |
| Writes a number of bits into a memory buffer at a given bit index. | |
| uint32 | juce::readLittleEndianBitsInBuffer (const void *sourceBuffer, uint32 startBit, uint32 numBits) noexcept |
| Reads a number of bits from a buffer at a given bit index. | |
| template<typename T > | |
| constexpr auto | juce::toUnderlyingType (T t) -> std::enable_if_t< std::is_enum_v< T >, std::underlying_type_t< T > > |
| Converts an enum to its underlying integral type. | |
| #define JUCE_UNDENORMALISE | ( | x | ) |
This macro can be applied to a float variable to check whether it contains a denormalised value, and to normalise it if necessary.
On CPUs that aren't vulnerable to denormalisation problems, this will have no effect.
Definition at line 731 of file juce_MathsFunctions.h.