1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2025-04-13 02:50:34 +00:00
the-cold-night/src/Utils.gd

13 lines
373 B
GDScript3
Raw Normal View History

2022-04-04 21:31:58 +02:00
class_name Utils
static func is_between(m, val, x):
return (m < val) && (val <= x)
2022-04-05 02:41:13 +02:00
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])