Add FEET_PER_MILE macro and use it throughout

The macro replaces uses of the float value 5280.0 (being the
number of feet in a mile).

This improves readability, particularly for readers from metric
backgrounds.
This commit is contained in:
albert
2017-08-24 13:06:50 +02:00
parent 01b1cbe624
commit 3059e1a6a6
4 changed files with 21 additions and 20 deletions

View File

@@ -20,6 +20,7 @@
#define METERS_PER_MILE 1609.344
#define METERS_PER_FOOT 0.3048
#define KM_PER_MILE 1.609344
#define FEET_PER_MILE 5280.0
#define FOUR_THIRDS 1.3333333333333
#define MAX(x,y)((x)>(y)?(x):(y))