aboutsummaryrefslogtreecommitdiffstats
path: root/units.h
diff options
context:
space:
mode:
Diffstat (limited to 'units.h')
-rw-r--r--units.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/units.h b/units.h
index 0baf2ffa5..1273bd9bb 100644
--- a/units.h
+++ b/units.h
@@ -149,6 +149,11 @@ static inline double mm_to_feet(int mm)
return mm * 0.00328084;
}
+static inline double m_to_mile(int m)
+{
+ return m / 1609.344;
+}
+
static inline unsigned long feet_to_mm(double feet)
{
return rint(feet * 304.8);