pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r4026 - trunk/pingus/src/math


From: grumbel at BerliOS
Subject: [Pingus-CVS] r4026 - trunk/pingus/src/math
Date: Wed, 4 Nov 2009 23:49:08 +0100

Author: grumbel
Date: 2009-11-04 23:49:08 +0100 (Wed, 04 Nov 2009)
New Revision: 4026

Modified:
   trunk/pingus/src/math/math.cpp
   trunk/pingus/src/math/math.hpp
Log:
-Wconversion cleanup

Modified: trunk/pingus/src/math/math.cpp
===================================================================
--- trunk/pingus/src/math/math.cpp      2009-11-04 22:44:31 UTC (rev 4025)
+++ trunk/pingus/src/math/math.cpp      2009-11-04 22:49:08 UTC (rev 4026)
@@ -21,7 +21,7 @@
 
 float abs(float v)
 {
-  return ::fabs(v);
+  return ::fabsf(v);
 }
 
 float sin(float a)

Modified: trunk/pingus/src/math/math.hpp
===================================================================
--- trunk/pingus/src/math/math.hpp      2009-11-04 22:44:31 UTC (rev 4025)
+++ trunk/pingus/src/math/math.hpp      2009-11-04 22:49:08 UTC (rev 4026)
@@ -68,7 +68,7 @@
 inline
 float frand()
 {
-  return rand() / (RAND_MAX + 1.0f);
+  return static_cast<float>(rand()) / (static_cast<float>(RAND_MAX) + 1.0f);
 }
 
 inline





reply via email to

[Prev in Thread] Current Thread [Next in Thread]