You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AM2R-TimeTrials/scripts/steps_to_time.gml

17 lines
489 B

/// steps_to_time(steps)
// Converts a number of steps into "mm:ss.f" format
sec = floor(argument0 / 60);
dec = floor((argument0 / 60 - sec) * 100);
minute = floor(sec / 60);
sec2 = sec - minute * 60;
if (minute < 10) {
minstr = "0" + string(minute);
} else minstr = string(minute);
if (sec2 < 10) {
secstr = "0" + string(sec2);
} else secstr = string(sec2);
if (dec < 10) {
decstr = "0" + string(dec);
} else decstr = string(dec);
return minstr + ":" + secstr + "." + decstr;