mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-29 18:53:44 +01:00
Add quaternion.compose
This commit is contained in:
parent
317123619b
commit
d54e76c138
@ -28,6 +28,10 @@ function multiply(self, other)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function compose(self, other)
|
||||||
|
return multiply(other, self)
|
||||||
|
end
|
||||||
|
|
||||||
function normalize(self)
|
function normalize(self)
|
||||||
local len = math.sqrt(self[1] ^ 2 + self[2] ^ 2 + self[3] ^ 2 + self[4] ^ 2)
|
local len = math.sqrt(self[1] ^ 2 + self[2] ^ 2 + self[3] ^ 2 + self[4] ^ 2)
|
||||||
local res = {}
|
local res = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user