19.06.2013, 17:29
Floatround expects floats, which these values are not. But if you calculate the values in the right order then you won't need any rounding at all. Here's something I quickly wrote in notepad. Should work:
Код:
totaltime = 5000 seconds = totaltime % 3600; // 5000 % 3600 = 1400 hours = (totaltime - seconds) / 3600 // (5000 - 1400) / 3600 = 1 temp = seconds; // 1400 seconds = seconds % 60; // 1400 % 60 = 20 minutes = (temp - seconds) / 60 // (1400 - 20) / 60 = 23