diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-01-03 19:31:33 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-01-03 19:31:33 +0100 |
commit | 352056c23c6258c7acbd9593eacdf1e4bfef3e9e (patch) | |
tree | 95ae2feadaa4fff4ebde977e5fb9f1a1b8fe3b32 /src/utils/speedconv.h | |
parent | 6bb8e30f5afc1c77987d8fdef71df880e72db151 (diff) | |
download | manaserv-352056c23c6258c7acbd9593eacdf1e4bfef3e9e.tar.gz manaserv-352056c23c6258c7acbd9593eacdf1e4bfef3e9e.tar.bz2 manaserv-352056c23c6258c7acbd9593eacdf1e4bfef3e9e.tar.xz manaserv-352056c23c6258c7acbd9593eacdf1e4bfef3e9e.zip |
Cleaned up and document a bit more the speed conversion functions.
Trivial fix.
Diffstat (limited to 'src/utils/speedconv.h')
-rw-r--r-- | src/utils/speedconv.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/utils/speedconv.h b/src/utils/speedconv.h index 33e1a944..7dca10e7 100644 --- a/src/utils/speedconv.h +++ b/src/utils/speedconv.h @@ -24,21 +24,27 @@ // Simple helper functions for converting between tiles per // second and the internal speed representation -#include "defines.h" - namespace utils { /** - * tpsToSpeed() + * Translate the speed in tiles per second (tps) + * into the raw speed used internally. + * The raw speed is the number of tiles moves per server tick * 100 + * since a server tick is currently 100 ms. + * * @param tps The speed value in tiles per second + * * @returns The speed value in the internal representation */ - double tpsToSpeed(double); + double tpsToRawSpeed(double); + /** - * speedToTps() + * Translate the raw speed used internally into a tile per second one. + * * @param speed The speed value in the internal representation + * * @returns The speed value in tiles per second */ - double speedToTps(double); + double rawSpeedToTps(double); } #endif // SPEEDCONV_H |