From 8dbb356fb79e43587fda93090d8ced5ee85f5160 Mon Sep 17 00:00:00 2001 From: Richard Bailey Date: Wed, 24 Jan 2024 14:45:23 +0000 Subject: [PATCH] Replace deprecated juce::floatPi with juce::MathConstants::pi --- .../plugins/binaural_monitoring/src/orientation_osc.cpp | 2 +- shared/components/orientation.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ear-production-suite-plugins/plugins/binaural_monitoring/src/orientation_osc.cpp b/ear-production-suite-plugins/plugins/binaural_monitoring/src/orientation_osc.cpp index 0514e4508..b093df232 100644 --- a/ear-production-suite-plugins/plugins/binaural_monitoring/src/orientation_osc.cpp +++ b/ear-production-suite-plugins/plugins/binaural_monitoring/src/orientation_osc.cpp @@ -8,7 +8,7 @@ namespace ear { namespace plugin { -const float oneRadInDegs = 180.f / juce::float_Pi; +const float oneRadInDegs = 180.f / juce::MathConstants::pi; ListenerOrientationOscReceiver::ListenerOrientationOscReceiver() { osc.addListener(this); diff --git a/shared/components/orientation.hpp b/shared/components/orientation.hpp index d87570a8f..f8266f742 100644 --- a/shared/components/orientation.hpp +++ b/shared/components/orientation.hpp @@ -357,7 +357,7 @@ class OrientationView : public Component, if (fabs(y) <= yRad) { - if (angle < (float_Pi / 2.f) || angle > 3.f * (float_Pi / 2.f)) { + if (angle < (MathConstants::pi / 2.f) || angle > 3.f * (MathConstants::pi / 2.f)) { intersection.x = xRad; intersection.y = y; } else { @@ -367,7 +367,7 @@ class OrientationView : public Component, } else { float x = yRad / tangent; - if (angle < float_Pi) { + if (angle < MathConstants::pi) { intersection.x = x; intersection.y = yRad; } else {