diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index baaac90bb0396b039405a0489fd2454dc97a2ebc..e58a527b54f397dad5980d5137599a19e261bcbe 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);