mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-28 03:45:24 +01:00
Add vector.offset (#10321)
This commit is contained in:
@@ -137,6 +137,12 @@ function vector.divide(a, b)
|
||||
end
|
||||
end
|
||||
|
||||
function vector.offset(v, x, y, z)
|
||||
return {x = v.x + x,
|
||||
y = v.y + y,
|
||||
z = v.z + z}
|
||||
end
|
||||
|
||||
function vector.sort(a, b)
|
||||
return {x = math.min(a.x, b.x), y = math.min(a.y, b.y), z = math.min(a.z, b.z)},
|
||||
{x = math.max(a.x, b.x), y = math.max(a.y, b.y), z = math.max(a.z, b.z)}
|
||||
|
||||
Reference in New Issue
Block a user