From 362c7ea52debc32942d006b004a35ba07222c0f7 Mon Sep 17 00:00:00 2001 From: binarycat Date: Fri, 11 Mar 2022 14:10:18 -0500 Subject: [PATCH] add Point.copy --- code/point.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/point.lua b/code/point.lua index aef9aa0..3c56630 100644 --- a/code/point.lua +++ b/code/point.lua @@ -31,3 +31,7 @@ end function Point:__tostring() return "("..self.x..","..self.y..")" end + +function Point:copy() + return Point:new(self.x, self.y) +end