From: divverent Date: Tue, 14 Apr 2009 06:47:48 +0000 (+0000) Subject: hopefully fix llrint X-Git-Tag: svn-r421~100 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=accda3fda7f52ab72bcadcaea659db07d296d3dc;p=xonotic%2Fnetradiant.git hopefully fix llrint git-svn-id: svn://svn.icculus.org/netradiant/trunk@320 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/libs/math/vector.h b/libs/math/vector.h index 23f91061..57022dbb 100644 --- a/libs/math/vector.h +++ b/libs/math/vector.h @@ -42,11 +42,21 @@ inline int lrint (double flt) return i; } +inline __int64 llrint(double f) +{ + return static_cast<__int64>(f + 0.5); +} + #elif defined(__FreeBSD__) -inline int lrint(double f) +inline long lrint(double f) +{ + return static_cast(f + 0.5); +} + +inline long long llrint(double f) { - return static_cast(f + 0.5); + return static_cast(f + 0.5); } #elif defined(__GNUC__)