cleanup pi

use only one constant for Pi, in case we ever need to change it
This commit is contained in:
ac-stef
2017-04-28 15:18:00 +02:00
parent 967fd62077
commit 68c7ad1fe6
9 changed files with 21 additions and 78 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ void circle(GLuint tex, float x, float y, float r, float tx, float ty, float tr,
glVertex2f(x, y);
loopi(subdiv+1)
{
float c = cosf(2*M_PI*i/float(subdiv)), s = sinf(2*M_PI*i/float(subdiv));
float c = cosf(PI2 * i / float(subdiv)), s = sinf(PI2 * i / float(subdiv));
glTexCoord2f(tx + tr*c, ty + tr*s);
glVertex2f(x + r*c, y + r*s);
}