Skip to content

Commit

Permalink
comment on line algo
Browse files Browse the repository at this point in the history
  • Loading branch information
SwissalpS committed Apr 28, 2024
1 parent 337be49 commit ba1e2a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ local function runcommand(pos, meta, command)
local length = 1 + vector.distance(p1, p2)
local dir = vector.direction(p1, p2)
local point
-- not the most eficient process for horizontal, vertical
-- or 45 degree lines
for i = 0, length, 0.3 do
point = vector.add(p1, vector.multiply(dir, i))
point = vector.floor(point)
Expand Down

0 comments on commit ba1e2a2

Please sign in to comment.