Merge pull request #56 from mchlnix/patch-1

adds missing do statement after for loops
This commit is contained in:
Matthias Richter 2018-04-08 14:00:59 +02:00 committed by GitHub
commit 4e87f0df1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ You can iterate over the shapes using ``pairs`` (see example).
**Example**:: **Example**::
local collisions = HC.collisions(shape) local collisions = HC.collisions(shape)
for other, separating_vector in pairs(collisions) for other, separating_vector in pairs(collisions) do
shape:move(-separating_vector.x/2, -separating_vector.y/2) shape:move(-separating_vector.x/2, -separating_vector.y/2)
other:move( separating_vector.x/2, separating_vector.y/2) other:move( separating_vector.x/2, separating_vector.y/2)
end end
@ -237,7 +237,7 @@ You can iterate over the shapes using ``pairs`` (see example).
**Example**:: **Example**::
local candidates = HC.neighbors(shape) local candidates = HC.neighbors(shape)
for other in pairs(candidates) for other in pairs(candidates) do
local collides, dx, dy = shape:collidesWith(other) local collides, dx, dy = shape:collidesWith(other)
if collides then if collides then
other:move(dx, dy) other:move(dx, dy)