History

Turns out sincos is a GNU thing.

Andrzej Kapolka committed 13 years ago

Commit 9356d1a1 parent b36404f1 file · +5 −9Browse files

Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

interface/src/renderer/GeometryCache.cpp+5−9
@@ -25,18 +25,14 @@ void GeometryCache::renderHemisphere(int slices, int stacks) { · 24 unmodified lines
2525 GLfloat* vertexData = new GLfloat[vertices * 3];
2626 GLfloat* vertex = vertexData;
2727 for (int i = 0; i < stacks - 1; i++) {
28− float phi = PIf * 0.5f * i / (stacks - 1), z, radius;
29− sincosf(phi, &z, &radius);
28+ float phi = PIf * 0.5f * i / (stacks - 1);
29+ float z = sinf(phi), radius = cosf(phi);
3030
3131 for (int j = 0; j < slices; j++) {
3232 float theta = PIf * 2.0f * j / slices;
33− float x, y;
34− sincosf(theta, &x, &y);
35− x *= radius;
36− y *= radius;
37−
38− *(vertex++) = x;
39− *(vertex++) = y;
33+
34+ *(vertex++) = sinf(theta) * radius;
35+ *(vertex++) = cosf(theta) * radius;
4036 *(vertex++) = z;
4137 }
4238 }