summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index c141eb5e71..303bef9abc 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -22,6 +22,7 @@
#include <map>
#include <set>
#include <memory>
+#include <cstdlib>
#include <time.h>
@@ -333,6 +334,11 @@ struct coord_def
{
return (x * x + y * y);
}
+
+ int rdist() const
+ {
+ return (MAXIMUM(::abs(x), ::abs(y)));
+ }
};
struct dice_def