From 90cc36f7e2466f102668073e0d1f104f30912887 Mon Sep 17 00:00:00 2001 From: matthijs Date: Mon, 11 Apr 2005 20:19:41 +0000 Subject: (svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding... --- map.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/map.h b/map.h index b00907015..3bf619b24 100644 --- a/map.h +++ b/map.h @@ -121,7 +121,9 @@ static inline TileIndexDiff TileOffsByDir(uint dir) /* Approximation of the length of a straight track, relative to a diagonal * track (ie the size of a tile side). #defined instead of const so it can * stay integer. (no runtime float operations) Is this needed? + * Watch out! There are _no_ brackets around here, to prevent intermediate + * rounding! Be careful when using this! * This value should be sqrt(2)/2 ~ 0.7071 */ -#define STRAIGHT_TRACK_LENGTH (7071/10000) +#define STRAIGHT_TRACK_LENGTH 7071/10000 #endif -- cgit v1.2.3-70-g09d2