]> Git trees. - libqmvoc.git/commitdiff
don't call sqrt(int), it is not guaranteed. If it's not there, the call
authorMarc Espie <espie@nerim.net>
Sat, 24 Mar 2007 12:27:36 +0000 (12:27 +0000)
committerMarc Espie <espie@nerim.net>
Sat, 24 Mar 2007 12:27:36 +0000 (12:27 +0000)
will be ambiguous.

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=646054

libscience/compoundviewer/kalziumglhelperclasses.cpp

index f7af456d34219f22a7d7ef3650c9270d320140e8..afd714063feba1269eafe8fc6b6acee0cbacd7e5 100644 (file)
@@ -219,7 +219,7 @@ void Sphere::computeVertex( int strip, int column, int row)
        Vector3f & vertex = m_vertexBuffer[ index ];
 
        // the "golden ratio", useful to construct an icosahedron
-       const float phi = ( 1 + sqrt(5) ) / 2;
+       const float phi = ( 1 + sqrt(5.0) ) / 2;
 
        // the 12 vertices of the icosahedron
        const Vector3f northPole( 0, 1, phi );