Miscellaneous control-stage functions that don't yet have a proper home.
local misc = require("__flib__.misc")
get_distance(pos1, pos2) | Calculate the distance in tiles between two positions. |
get_distance_squared(pos1, pos2) | Calculate the squared distance in tiles between two positions. |
ticks_to_timestring([tick=game.ticks_played][, include_leading_zeroes]) | Convert given tick or game.tick into "[hh:]mm:ss" format. |
delineate_number(number[, delimiter="]) | Split numerical values by a delimiter. |
Calculate the distance in tiles between two positions.
Parameters: Returns:
Calculate the squared distance in tiles between two positions.
Parameters: Returns:
Convert given tick or game.tick into "[hh:]mm:ss" format.
Parameters:
Split numerical values by a delimiter.
Adapted from lua-users.org.
Parameters: Returns: