(svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding...

This commit is contained in:
matthijs 2005-04-11 20:19:41 +00:00
parent f5d9cb58eb
commit 90cc36f7e2
1 changed files with 3 additions and 1 deletions

4
map.h
View File

@ -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