diff options
author | matthijs <matthijs@openttd.org> | 2005-04-11 20:19:41 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2005-04-11 20:19:41 +0000 |
commit | 78eeb84d6bd29736a35467651d4a8631e9cf4171 (patch) | |
tree | 3c915b95fc6fd67d8370c443e5d01c41259305af | |
parent | 1858c373469d24b78b2710fcd2a0bb2288174ba1 (diff) | |
download | openttd-78eeb84d6bd29736a35467651d4a8631e9cf4171.tar.xz |
(svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding...
-rw-r--r-- | map.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |