Prechádzať zdrojové kódy

Fix MSVC14 warning cast double to real

Alexandre Avenel 7 rokov pred
rodič
commit
273f6b0267
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      code/FindDegenerates.cpp

+ 2 - 2
code/FindDegenerates.cpp

@@ -93,7 +93,7 @@ void FindDegeneratesProcess::Execute( aiScene* pScene) {
 
 static ai_real heron( ai_real a, ai_real b, ai_real c ) {
     ai_real s = (a + b + c) / 2;
-    ai_real area = pow((s * ( s - a ) * ( s - b ) * ( s - c ) ), 0.5 );
+    ai_real area = pow((s * ( s - a ) * ( s - b ) * ( s - c ) ), (ai_real)0.5 );
     return area;
 }
 
@@ -102,7 +102,7 @@ static ai_real distance3D( const aiVector3D &vA, aiVector3D &vB ) {
     const ai_real ly = ( vB.y - vA.y );
     const ai_real lz = ( vB.z - vA.z );
     ai_real a = lx*lx + ly*ly + lz*lz;
-    ai_real d = pow( a, 0.5 );
+    ai_real d = pow( a, (ai_real)0.5 );
 
     return d;
 }