From: Alexander Monakov Date: Thu, 5 May 2011 04:03:41 +0000 (+0400) Subject: Obtain float max value from std::numeric_limits X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=ef3770e6d9a8bc0d465660ca87f8611a25d98d22;p=lugaru.git Obtain float max value from std::numeric_limits --- diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index b30d4f1..58a3bde 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif +#include #include #include "Game.h" #include "openal_wrapper.h" @@ -431,7 +432,7 @@ static void ch_size(Game *game, const char *args) static int find_closest() { int closest = 0; - float closestdist = 1.0/0.0; + float closestdist = std::numeric_limits::max(); for (int i = 1; i < numplayers; i++) { float distance;