Skip to content

Commit

Permalink
Replace deprecated juce::floatPi with juce::MathConstants<float>::pi
Browse files Browse the repository at this point in the history
  • Loading branch information
rsjbailey committed Mar 6, 2024
1 parent 8365a3a commit 8dbb356
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace ear {
namespace plugin {

const float oneRadInDegs = 180.f / juce::float_Pi;
const float oneRadInDegs = 180.f / juce::MathConstants<float>::pi;

ListenerOrientationOscReceiver::ListenerOrientationOscReceiver() {
osc.addListener(this);
Expand Down
4 changes: 2 additions & 2 deletions shared/components/orientation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>::pi / 2.f) || angle > 3.f * (MathConstants<float>::pi / 2.f)) {
intersection.x = xRad;
intersection.y = y;
} else {
Expand All @@ -367,7 +367,7 @@ class OrientationView : public Component,
} else {
float x = yRad / tangent;

if (angle < float_Pi) {
if (angle < MathConstants<float>::pi) {
intersection.x = x;
intersection.y = yRad;
} else {
Expand Down

0 comments on commit 8dbb356

Please sign in to comment.