From 42fa692051687542267b88809703d536b97a779c Mon Sep 17 00:00:00 2001 From: Cy Date: Wed, 6 Nov 2013 19:08:18 -0800 Subject: [PATCH] Don't assert scalars must be vectors. --- builtin/vector.lua | 8 ++++---- 1 file 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}