From 164d2a37d92bcbdd31a53384328ab3d66569c72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Fri, 4 Apr 2025 22:57:16 +0200 Subject: [PATCH] technically correct 'tau' --- synthetizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthetizer.cpp b/synthetizer.cpp index b5ac2c9..1f23864 100644 --- a/synthetizer.cpp +++ b/synthetizer.cpp @@ -6,7 +6,7 @@ #include const int SAMPLE_RATE = 44100; -const double TWO_PI = 6.283185307179586476925286766559; +const double M_TAU = 6.283185307179586476925286766559; // Enum for waveform types enum Waveform { @@ -76,7 +76,7 @@ bool loadWaveParams(const std::string& filename, std::vector& waves, int& // Waveform generation functions double sineWave(double frequency, double time) { - return std::sin(TWO_PI * frequency * time); + return std::sin(M_TAU * frequency * time); } double triangleWave(double frequency, double time) {