From b90bd4cd4fc8ea898912541ab48995117cecf174 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 16 Jun 2019 15:30:50 +0300 Subject: [PATCH] Use a different way of obtaining the value of pi M_PI is not strictly a part of the C++ standard. --- source/vignette.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/vignette.cpp b/source/vignette.cpp index e4d7de8..27b2dc1 100644 --- a/source/vignette.cpp +++ b/source/vignette.cpp @@ -27,7 +27,8 @@ void Vignette::set_optical(float pupil, float aperture) float p_sq = pupil*pupil; float a_sq = aperture*aperture; float two_ap = 2*pupil*aperture; - shdata.uniform("optical", pupil, aperture, a_sq, a_sq*M_PI); + static const float pi = Geometry::Angle::straight().radians(); + shdata.uniform("optical", pupil, aperture, a_sq, a_sq*pi); shdata.uniform("optical_range", p_sq-two_ap+a_sq, p_sq+two_ap+a_sq); } -- 2.45.2