Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit fbc52e9

Browse files
committed
Fix a small bug on Area constructor that would create areas wider and taller than intended
1 parent 329527d commit fbc52e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Classes/Area Class.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Area:new(firstCorner, width, height)
1111

1212
local secondCorner = Point:new(width)
1313
if secondCorner == nil then
14-
secondCorner = firstCorner + Point:new(width, height)
14+
secondCorner = firstCorner + Point:new(width - 1, height - 1)
1515
end
1616

1717
if type(firstCorner) ~= 'Point' or type(secondCorner) ~= 'Point' then

0 commit comments

Comments
 (0)