mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-29 10:43:43 +01:00
Fix vector.interpolate
This commit is contained in:
parent
41f25a9e31
commit
64d3d9672e
@ -119,7 +119,7 @@ metatable.__div = divide
|
|||||||
--+ linear interpolation
|
--+ linear interpolation
|
||||||
--: ratio number from 0 (all the first vector) to 1 (all the second vector)
|
--: ratio number from 0 (all the first vector) to 1 (all the second vector)
|
||||||
function interpolate(v, w, ratio)
|
function interpolate(v, w, ratio)
|
||||||
return add(multiply(v, 1 - ratio), multiply(w, ratio))
|
return add(multiply_scalar(v, 1 - ratio), multiply_scalar(w, ratio))
|
||||||
end
|
end
|
||||||
|
|
||||||
function norm(v)
|
function norm(v)
|
||||||
|
Loading…
Reference in New Issue
Block a user