1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2025-04-01 13:11:00 +00:00
the-cold-night/src/Utils.gd
2022-04-05 02:41:13 +02:00

13 lines
No EOL
373 B
GDScript

class_name Utils
static func is_between(m, val, x):
return (m < val) && (val <= x)
static func format_time(value):
var minutes: int = floor(value / 60)
var seconds_and_millis: float = value - minutes * 60
var seconds: int = int(seconds_and_millis)
var millis: int = int((seconds_and_millis - seconds) * 1000)
return "%01d:%02d.%03d" % ([minutes, seconds, millis])