From dde0770def9750cdda6cb204bd1354c543a68e0c Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Fri, 6 Nov 2009 21:51:43 +0100 Subject: Put DJGPP's round() into a #define so other builds don't suffer. --- crawl-ref/source/ray.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/ray.cc') diff --git a/crawl-ref/source/ray.cc b/crawl-ref/source/ray.cc index 2b7c091085..f2b8c067ef 100644 --- a/crawl-ref/source/ray.cc +++ b/crawl-ref/source/ray.cc @@ -29,7 +29,7 @@ static int _ifloor(double d) static int iround(double d) { - return static_cast(floor(d+0.5)); + return static_cast(round(d)); } static int ifloor(double d) @@ -43,7 +43,7 @@ static int ifloor(double d) static bool double_is_integral(double d) { - return (double_is_zero(d - floor(d+0.5))); + return (double_is_zero(d - round(d))); } // Is v in the interiour of a diamond? -- cgit v1.2.3-54-g00ecf