From a9593d926e516cca60d1e9265be04a6096ceb63a Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 20 Oct 2016 22:57:12 -0300 Subject: [PATCH] Fix love.math.noise(nil) to error instead of returning nil. --- src/modules/math/wrap_Math.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/math/wrap_Math.lua b/src/modules/math/wrap_Math.lua index 77ed4ce0e..d45c5a76b 100644 --- a/src/modules/math/wrap_Math.lua +++ b/src/modules/math/wrap_Math.lua @@ -88,7 +88,7 @@ function love_math.noise(x, y, z, w) return tonumber(ffifuncs.noise3(x, y, z)) elseif y ~= nil then return tonumber(ffifuncs.noise2(x, y)) - elseif x ~= nil then + else return tonumber(ffifuncs.noise1(x)) end end