placement: Fix a minor issue with closest_corner

It was using the wrong matrix in 2x2 mode.
This commit is contained in:
Emmanuel Lepage Vallee 2016-04-10 03:22:23 -04:00
parent 6e8337e26a
commit 8d95610363
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ function placement.closest_corner(d, args)
local grid_size = args.include_sides and 3 or 2 local grid_size = args.include_sides and 3 or 2
-- If the point is in the center, use the closest corner -- If the point is in the center, use the closest corner
local corner = f(grid_size, corners3x3) or f(2, corners2x2) local corner = grid_size == 3 and f(3, corners3x3) or f(2, corners2x2)
-- Transpose the corner back to the original size -- Transpose the corner back to the original size
local new_args = setmetatable({position = corner}, {__index=args}) local new_args = setmetatable({position = corner}, {__index=args})