Replace math.pow by ^

master
Lars Mueller 2020-12-19 15:18:08 +01:00
parent 8eff7626a4
commit 7e4b670cd6
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ end
function normalize(q)
local q_1, q_2, q_3, q_4 = q[1], q[2], q[3], q[4]
local len = math.sqrt(q_1 * q_1 + q_2 * q_2 + q_3 * q_3 + math.pow(q_4, 4))
local len = math.sqrt(q_1 * q_1 + q_2 * q_2 + q_3 * q_3 + (q_4 ^ 4))
local r = {}
for key, value in pairs(q) do
r[key] = value / len