diff options
author | Cy <whatever> | 2013-11-06 19:08:18 -0800 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-11-06 23:16:49 -0500 |
commit | 3d63492f50ecc547197df1818417d339906091f6 (patch) | |
tree | d409792400c9a5f11514c914e3cdea3e7b4ad6b2 | |
parent | 8ad052881cb40032db63cbc9c76ae3c9786f8ef9 (diff) | |
download | minetest-3d63492f50ecc547197df1818417d339906091f6.tar.gz minetest-3d63492f50ecc547197df1818417d339906091f6.tar.bz2 minetest-3d63492f50ecc547197df1818417d339906091f6.zip |
Don't assert scalars must be vectors.
-rw-r--r-- | builtin/vector.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/vector.lua b/builtin/vector.lua index 6b787366d..77944b612 100644 --- a/builtin/vector.lua +++ b/builtin/vector.lua @@ -90,8 +90,8 @@ end function vector.add(a, b) assert_vector(a) - assert_vector(b) if type(b) == "table" then + assert_vector(b) return {x = a.x + b.x, y = a.y + b.y, z = a.z + b.z} @@ -104,8 +104,8 @@ end function vector.subtract(a, b) assert_vector(a) - assert_vector(b) if type(b) == "table" then + assert_vector(b) return {x = a.x - b.x, y = a.y - b.y, z = a.z - b.z} @@ -118,8 +118,8 @@ end function vector.multiply(a, b) assert_vector(a) - assert_vector(b) if type(b) == "table" then + assert_vector(b) return {x = a.x * b.x, y = a.y * b.y, z = a.z * b.z} @@ -132,8 +132,8 @@ end function vector.divide(a, b) assert_vector(a) - assert_vector(b) if type(b) == "table" then + assert_vector(b) return {x = a.x / b.x, y = a.y / b.y, z = a.z / b.z} |