diff options
-rw-r--r-- | src/threed/geometry/qglsphere.cpp | 2 | ||||
-rw-r--r-- | tests/auto/imports/qspheremesh/tst_qspheremesh.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/threed/geometry/qglsphere.cpp b/src/threed/geometry/qglsphere.cpp index 4f10ebebf..053f79a5f 100644 --- a/src/threed/geometry/qglsphere.cpp +++ b/src/threed/geometry/qglsphere.cpp @@ -188,7 +188,7 @@ QGLBuilder& operator<<(QGLBuilder& builder, const QGLSphere& sphere) float stackSin[maxStacks]; float stackCos[maxStacks]; for (int slice = 0; slice < slices; ++slice) { - float angle = 2.0f * M_PI * slice / slices; + float angle = 2.0f * M_PI * (slices - 1 - slice) / slices; sliceSin[slice] = qFastSin(angle); sliceCos[slice] = qFastCos(angle); } diff --git a/tests/auto/imports/qspheremesh/tst_qspheremesh.cpp b/tests/auto/imports/qspheremesh/tst_qspheremesh.cpp index b9689b6c1..7000aa42f 100644 --- a/tests/auto/imports/qspheremesh/tst_qspheremesh.cpp +++ b/tests/auto/imports/qspheremesh/tst_qspheremesh.cpp @@ -162,7 +162,7 @@ void tst_QSphereMesh::testGeometry() if (triangleNormal.lengthSquared()>0.001) { triangleNormal.normalize(); float dp = QVector3D::dotProduct(triangleNormal,nn0); - QVERIFY(dp<-0.8628); + QVERIFY(dp>0.8628); } } } |