aboutsummaryrefslogtreecommitdiff
path: root/src/guiEngine.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-14 00:18:31 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-14 00:18:31 -0500
commitdcbf1b3ce55e70e5c9294ba5271df0a3f3c4ee79 (patch)
tree9fe6cced4617a31a002bd68923d574c936ce45a0 /src/guiEngine.h
parent17dde5ddd0387c66aefc77e210c676e39c3b653c (diff)
downloadminetest-dcbf1b3ce55e70e5c9294ba5271df0a3f3c4ee79.tar.gz
minetest-dcbf1b3ce55e70e5c9294ba5271df0a3f3c4ee79.tar.bz2
minetest-dcbf1b3ce55e70e5c9294ba5271df0a3f3c4ee79.zip
Noise: Don't assume Noise is used for 2D unless gradientMap2D is actually called
Diffstat (limited to 'src/guiEngine.h')
0 files changed, 0 insertions, 0 deletions
num">2, 3)) assert.same({ x = 3, y = 2, z = 1 }, vector.new({ x = 3, y = 2, z = 1 })) local input = vector.new({ x = 3, y = 2, z = 1 }) local output = vector.new(input) assert.same(input, output) assert.are_not.equal(input, output) end) it("throws on invalid input", function() assert.has.errors(function() vector.new({ x = 3 }) end) assert.has.errors(function() vector.new({ d = 3 }) end) end) end) it("equal()", function() local function assertE(a, b) assert.is_true(vector.equals(a, b)) end local function assertNE(a, b) assert.is_false(vector.equals(a, b)) end assertE({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) assertE({x = -1, y = 0, z = 1}, {x = -1, y = 0, z = 1}) local a = { x = 2, y = 4, z = -10 } assertE(a, a) assertNE({x = -1, y = 0, z = 1}, a) end) it("add()", function() assert.same({ x = 2, y = 4, z = 6 }, vector.add(vector.new(1, 2, 3), { x = 1, y = 2, z = 3 })) end) end)