mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +01:00
Fix quaternion.from_euler_rotation
This commit is contained in:
parent
002d1e187b
commit
d1a285be33
@ -12,9 +12,9 @@ function from_euler_rotation(rotation)
|
|||||||
local cos = vector.apply(rotation, math.cos)
|
local cos = vector.apply(rotation, math.cos)
|
||||||
local sin = vector.apply(rotation, math.sin)
|
local sin = vector.apply(rotation, math.sin)
|
||||||
return {
|
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 * sin.x * cos.y + sin.z * cos.x * sin.y,
|
||||||
cos.z * cos.x * sin.y - sin.z * sin.x * cos.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
|
cos.z * cos.x * cos.y + sin.z * sin.x * sin.y
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user