Added lume.vector(), updated README and tests

This commit is contained in:
rxi
2016-09-19 21:55:59 +01:00
parent 59f90934aa
commit b569915d3e
3 changed files with 35 additions and 13 deletions

View File

@@ -111,6 +111,11 @@ function lume.angle(x1, y1, x2, y2)
end
function lume.vector(angle, magnitude)
return math.cos(angle) * magnitude, math.sin(angle) * magnitude
end
function lume.random(a, b)
if not a then a, b = 0, 1 end
if not b then b = 0 end