upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)

This commit is contained in:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -42,7 +42,7 @@ using uint16 = unsigned short;
/** A platform-independent 32-bit signed integer type. */
using int32 = signed int;
/** A platform-independent 32-bit unsigned integer type. */
typedef unsigned int uint32;
using uint32 = unsigned int;
#if JUCE_MSVC
/** A platform-independent 64-bit integer type. */
@ -197,7 +197,6 @@ void findMinAndMax (const Type* values, int numValues, Type& lowest, Type& highe
}
}
//==============================================================================
/** Constrains a value to keep it within a given range.
@ -265,6 +264,25 @@ bool isPositiveAndNotGreaterThan (int valueToTest, Type upperLimit) noexcept
return static_cast<unsigned int> (valueToTest) <= static_cast<unsigned int> (upperLimit);
}
/** 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 Type>
bool isWithin (Type a, Type b, Type tolerance) noexcept
{
return std::abs (a - b) <= tolerance;
}
/** Returns true if the two numbers are approximately equal. This is useful for floating-point
and double comparisons.
*/
template <typename Type>
bool approximatelyEqual (Type a, Type b) noexcept
{
return std::abs (a - b) <= (std::numeric_limits<Type>::epsilon() * std::max (a, b))
|| std::abs (a - b) < std::numeric_limits<Type>::min();
}
//==============================================================================
/** Handy function for avoiding unused variables warning. */
template <typename... Types>