From 334666a5615e0996fa036cc44ed94777aee76867 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Dec 2025 17:39:47 +0300 Subject: [PATCH] Fixed a typo in the vector3:rot and duplicate vector2.__eq --- res/modules/vector2.lua | 7 +------ res/modules/vector3.lua | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/res/modules/vector2.lua b/res/modules/vector2.lua index dad44ee1e..80bf1030b 100644 --- a/res/modules/vector2.lua +++ b/res/modules/vector2.lua @@ -8,7 +8,7 @@ local vector2 = vector2.__index = vector2 --- vec2 cocnrtuct +-- vec2 construct function vector2:new(x, y) if type(x) ~= "number" or type(y) ~= "number" then error("Invalid input argument. Expected two numbers. [ vec2(number, number) ]") @@ -303,11 +303,6 @@ function vector2.__eq(a, b) end --- eq vec -function vector2.__eq(a, b) - return a.x == b.x and a.y == b.y -end - function vector2.__tostring(vcrt) return vcrt:strvec2() end diff --git a/res/modules/vector3.lua b/res/modules/vector3.lua index 855cac3bb..0d9e52e45 100644 --- a/res/modules/vector3.lua +++ b/res/modules/vector3.lua @@ -187,7 +187,7 @@ function vector3:rot(angle, axis, convert2deg) self.y = sx * x + cx * y end elseif axis == nil then - local cosx, sx, cy, sy = math.cos(angle), math.sin(angle), math.cos(angle), math.sin(angle) + local cx, sx, cy, sy = math.cos(angle), math.sin(angle), math.cos(angle), math.sin(angle) local x, y, z = self.x, self.y, self.z self.x = cx * x - sx * y self.y = sx * x + cx * y