From d1a285be3356789d0fdd82ecf0e0b04c64092bb0 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sun, 29 Aug 2021 11:42:03 +0200 Subject: [PATCH] Fix quaternion.from_euler_rotation --- quaternion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quaternion.lua b/quaternion.lua index 54c72cc..d06ba1c 100644 --- a/quaternion.lua +++ b/quaternion.lua @@ -12,9 +12,9 @@ function from_euler_rotation(rotation) local cos = vector.apply(rotation, math.cos) local sin = vector.apply(rotation, math.sin) return { - sin.z * cos.x * cos.y - cos.z * sin.x * sin.y, cos.z * sin.x * cos.y + sin.z * cos.x * sin.y, cos.z * cos.x * sin.y - sin.z * sin.x * cos.y, + sin.z * cos.x * cos.y - cos.z * sin.x * sin.y, cos.z * cos.x * cos.y + sin.z * sin.x * sin.y } end