]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qh
Add a comment explaining the weird rounding math of TIME_ENCODE
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qh
index 05e4a4ea2736b4e5c8e92a9859e58ae870391c7b..8a471d5949cfb3c164ddfe89634b987e2db75715 100644 (file)
@@ -49,6 +49,8 @@ void db_put(int db, string key, string value);
 int buf_load(string filename);
 void buf_save(int buf, string filename);
 
+// adding just 0.4 for race times so it rounds down in the .5 case (matching the timer display)
+// FIXME it doesn't round properly
 #define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
 string format_time(float seconds);
 string mmsss(float t);