summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ray.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-06 00:09:33 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-06 00:27:16 +0100
commit7a9cf7d5dfcee5c454826aa88e7af9c3c6ac2acd (patch)
treef40dbf739c671bb04d9ba5fbf7b23460f459eb76 /crawl-ref/source/ray.cc
parentb3e5fd0bf35b44baef808414ebfc7fa3357d3631 (diff)
downloadcrawl-ref-7a9cf7d5dfcee5c454826aa88e7af9c3c6ac2acd.tar.gz
crawl-ref-7a9cf7d5dfcee5c454826aa88e7af9c3c6ac2acd.zip
Standard <cmath> has no round().
Diffstat (limited to 'crawl-ref/source/ray.cc')
-rw-r--r--crawl-ref/source/ray.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/ray.cc b/crawl-ref/source/ray.cc
index f2b8c067ef..2b7c091085 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<int>(round(d));
+ return static_cast<int>(floor(d+0.5));
}
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 - round(d)));
+ return (double_is_zero(d - floor(d+0.5)));
}
// Is v in the interiour of a diamond?