1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-14 02:34:09 +02:00

Update geometry.lua

This commit is contained in:
danielmartin0 2024-10-02 17:00:27 +01:00
parent f7018c4f67
commit c9a5f786f3

View File

@ -40,6 +40,10 @@ function Public.vector_sum(...)
return result return result
end end
function Public.vector_scaled(vec, scalar)
return { x = vec.x * scalar, y = vec.y * scalar }
end
function Public.vector_distance(vec1, vec2) function Public.vector_distance(vec1, vec2)
local vecx = vec2.x - vec1.x local vecx = vec2.x - vec1.x
local vecy = vec2.y - vec1.y local vecy = vec2.y - vec1.y