mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
vector.cross3: Assert dimension = 3
This commit is contained in:
parent
7507209f29
commit
02f24dd59f
@ -160,6 +160,7 @@ function clamp(v, min, max)
|
||||
end
|
||||
|
||||
function cross3(v, w)
|
||||
assert(#v == 3 and #w == 3)
|
||||
return new{
|
||||
v[2] * w[3] - v[3] * w[2],
|
||||
v[3] * w[1] - v[1] * w[3],
|
||||
|
Loading…
Reference in New Issue
Block a user