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

Commit 86ec828

Browse files
committed
Fix small bug on Point constructor
1 parent 6716324 commit 86ec828

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Classes/Point Class.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ function Point:new(x, y)
1010
else
1111
x, y = x[1], x[2]
1212
end
13+
elseif type(x) == 'string' or type(x) == 'string' then
14+
x = tonumber(x)
15+
y = tonumber(y)
1316
end
1417

1518
if type(x) ~= 'number' or type(y) ~= 'number' then

0 commit comments

Comments
 (0)