Skip to content

Commit eb1b9f4

Browse files
fix: Use std::numbers for pi
1 parent 5460994 commit eb1b9f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/VASVF.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// https://github.com/JordanTHarris/VAStateVariableFilter/blob/master/Source/Effects/VAStateVariableFilter.cpp
55

66
#include <cmath>
7+
#include <numbers>
78

89
//==============================================================================
910

@@ -169,7 +170,7 @@ class VASVF {
169170
void calcFilter() {
170171
if (active) {
171172
// prewarp the cutoff (for bilinear-transform filters)
172-
float wd = cutoffFreq * 2.0f * static_cast<float>(M_PI);
173+
float wd = cutoffFreq * 2.0f * std::numbers::pi_v<float>;
173174
float T = 1.0f / sampleRate;
174175
float wa = (2.0f / T) * std::tan(wd * T / 2.0f);
175176

0 commit comments

Comments
 (0)