tag mismatch
#2

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
Reply


Messages In This Thread
tag mismatch - by DetoNater - 19.06.2013, 17:04
Re: tag mismatch - by Vince - 19.06.2013, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)