Added rouding to time display, since otherwise the
1/100-th seconds can be incorrect. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5489 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
95aab2b2e3
commit
b9a63ebb0d
@ -362,7 +362,7 @@ namespace StringUtils
|
||||
{
|
||||
int min = (int) floor ( time / 60.0 ) ;
|
||||
int sec = (int) floor ( time - (double) ( 60 * min ) ) ;
|
||||
int hundredths = (int) floor ( 100.0f * (time - (double)(sec + 60* min)));
|
||||
int hundredths = (int) floor ( 100.0f * (time - (double)(sec + 60* min))+0.5f);
|
||||
// The proper c++ way would be:
|
||||
// std::ostringstream s;
|
||||
// s<<std::setw(2)<<std::setfill(' ')<<min<<":"
|
||||
|
Loading…
Reference in New Issue
Block a user