From c9285573b7b60210fa8791702a6c611c0faa6694 Mon Sep 17 00:00:00 2001 From: Oliver Bock Date: Thu, 22 Jul 2010 13:52:17 +0200 Subject: [PATCH] PI has already been defined --- src/pulsaranimationwidget.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index baaac90..e58a527 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -23,7 +23,6 @@ // workaround for lack of C99 support in C++ #define isnan(x) ((x) != (x)) -#define GL_PI 3.1415f const double PulsarAnimationWidget::deg2rad = PI/180.0; PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : @@ -377,7 +376,7 @@ void PulsarAnimationWidget::paintGL() // Loop around in a circle and specify even points along the circle // as the vertices of the triangle fan (32 sections) - for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) + for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) { // Calculate x and y position of the next vertex x = m_pulsarBeamOuterRadius * sin(angle); @@ -394,7 +393,7 @@ void PulsarAnimationWidget::paintGL() { glColor3f(0.66f, 0.66f, 0.0f); glVertex3f(0.0f, 0.0f, m_pulsarBeamLength); - for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) { + for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) { x = m_pulsarBeamInnerRadius * sin(angle); y = m_pulsarBeamInnerRadius * cos(angle); glVertex2f(x, y); @@ -432,7 +431,7 @@ void PulsarAnimationWidget::paintGL() // Loop around in a circle and specify even points along the circle // as the vertices of the triangle fan (32 sections) - for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) + for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) { // Calculate x and y position of the next vertex x = m_pulsarBeamOuterRadius * sin(angle); @@ -449,7 +448,7 @@ void PulsarAnimationWidget::paintGL() { glColor3f(0.66f, 0.66f, 0.0f); glVertex3f(0.0f, 0.0f, 3.0f); - for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) { + for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) { x = m_pulsarBeamInnerRadius * sin(angle); y = m_pulsarBeamInnerRadius * cos(angle); glVertex2f(x, y); -- GitLab