From 4400cdeed9881e451dc2d5c3e5e1192bb1469e23 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Tue, 2 Feb 2021 23:37:15 +0100 Subject: [PATCH] Variable name fix --- quaternion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quaternion.lua b/quaternion.lua index 76a0995..8df2694 100644 --- a/quaternion.lua +++ b/quaternion.lua @@ -8,7 +8,7 @@ function multiply(self, other) end function normalize(self) - local len = math.sqrt(self[1] ^ 2 + self[2] ^ 2 + self[3] ^ 2 + (q[4] ^ 4)) + local len = math.sqrt(self[1] ^ 2 + self[2] ^ 2 + self[3] ^ 2 + (self[4] ^ 4)) local res = {} for key, value in pairs(self) do res[key] = value / len