Module util
Assorted utility functions
Global Functions
| newweaktable () | Creates a new weak-keyed table |
| copy (t) | Copies a given table
This works by creating a new table, iterating t,
and setting the key-value pairs in the new table. |
| merge (a, b) | Merges key-value pairs from table b onto a copy of table a. |
| map_real (...) | Maps all bound object inputs to their corresponding userdata |
| ticks () | Returns the number of milliseconds since the engine booted. |
| frame_ticks () | Returns the number of milliseconds since the last frame was rendered. |
Global Functions
Global Functions.- newweaktable ()
-
Creates a new weak-keyed table
Returns:
-
A new weak-keyed table
- copy (t)
-
Copies a given table
This works by creating a new table, iterating
t, and setting the key-value pairs in the new table. This does not modifyt.Parameters:
- t table The table to be copied
Returns:
-
The newly copied table, or
niliftisnil - merge (a, b)
-
Merges key-value pairs from table
bonto a copy of tablea. This does not modifyaorb.Parameters:
Returns:
-
A new merged table
- map_real (...)
-
Maps all bound object inputs to their corresponding userdata
Parameters:
- ... Variable list of bound objects
Returns:
-
Variable list of userdata
- ticks ()
-
Returns the number of milliseconds since the engine booted.
Returns:
-
number
- frame_ticks ()
-
Returns the number of milliseconds since the last frame was rendered.
Returns:
-
number