feat(lib): add distance function

This commit is contained in:
Ryan 2025-02-18 21:34:57 -05:00
parent 324cb2d6d8
commit aa27d9fd36
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -12,6 +12,10 @@ function get_player(name)
end)[1]
end
function distance(p1, p2)
return math.sqrt((p2.x - p1.x) ^ 2 + (p2.y - p1.y) ^ 2 + (p2.z - p1.z) ^ 2)
end
function dump(object)
if type(object) == "table" then
local string = "{ "