Browse Source

Fixed a MSVC 2013 compiler error in juce_MathsFunctions.h

tags/2021-05-28
hogliux 7 years ago
parent
commit
0b67a40bb9
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      modules/juce_core/maths/juce_MathsFunctions.h

+ 9
- 2
modules/juce_core/maths/juce_MathsFunctions.h View File

@@ -343,12 +343,19 @@ template <typename FloatType>
struct MathConstants struct MathConstants
{ {
/** A predefined value for Pi */ /** A predefined value for Pi */
static constexpr FloatType pi = static_cast<FloatType> (3.141592653589793238L);
static const FloatType pi;
/** A predfined value for Euler's number */ /** A predfined value for Euler's number */
static constexpr FloatType euler = static_cast<FloatType> (2.71828182845904523536L);
static const FloatType euler;
}; };
template <typename FloatType>
const FloatType MathConstants<FloatType>::pi = static_cast<FloatType> (3.141592653589793238L);
template <typename FloatType>
const FloatType MathConstants<FloatType>::euler = static_cast<FloatType> (2.71828182845904523536L);
/** A predefined value for Pi, at double-precision. /** A predefined value for Pi, at double-precision.
@see float_Pi @see float_Pi
*/ */


Loading…
Cancel
Save