From accda3fda7f52ab72bcadcaea659db07d296d3dc Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 14 Apr 2009 06:47:48 +0000 Subject: [PATCH] hopefully fix llrint git-svn-id: svn://svn.icculus.org/netradiant/trunk@320 61c419a2-8eb2-4b30-bcec-8cead039b335 --- libs/math/vector.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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__) -- 2.39.2