1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

DSP: Added missing snapToZero in the StateVariableFilter

This commit is contained in:
hogliux 2017-09-06 16:22:03 +01:00
parent ede622c1ef
commit 11d031f9f0
4 changed files with 33 additions and 26 deletions

View file

@ -177,6 +177,21 @@ namespace juce
template <typename Type>
using Complex = ::std::complex<Type>;
//==============================================================================
namespace util
{
/** Use this function to prevent denormals on intel CPUs.
This function will work with both primitives and simple containers.
*/
inline void snapToZero (float& x) noexcept { JUCE_SNAP_TO_ZERO (x); }
#ifndef DOXYGEN
inline void snapToZero (double& x) noexcept { JUCE_SNAP_TO_ZERO (x); }
inline void snapToZero (long double& x) noexcept { JUCE_SNAP_TO_ZERO (x); }
#endif
}
//==============================================================================
#if JUCE_USE_SIMD
#include "native/juce_fallback_SIMDNativeOps.h"