Quote:
Originally Posted by SKAzini
Small improvement:
pawn Код:
ConvertToMinutes(time) { new string[10], minutes, seconds; minutes = floatround(time / 60); seconds = floatround(time - minutes * 60); format(string, sizeof(string), "%02d:%02d", minutes, seconds); return string; }
You don't need an if check there..
|
I still think this is the best solution. Except you can remove floatround as well. An integer divided by an integer yields an integer. Any decimals that would've come out in a "normal" calculation are simply dropped. Assuming our example from before, 330 / 60 would yield simply 5.