2022-09-19 02:18:48 +02:00
|
|
|
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
2021-06-26 15:26:40 +02:00
|
|
|
|
|
|
|
describe("Vector3.area", function()
|
|
|
|
it("should work with a positive vector", function()
|
|
|
|
local a = Vector3.new(3, 3, 3)
|
|
|
|
assert.are.equal(
|
2021-06-26 15:40:14 +02:00
|
|
|
27,
|
|
|
|
a:area()
|
2021-06-26 15:26:40 +02:00
|
|
|
)
|
|
|
|
end)
|
|
|
|
it("should work with a negative vector", function()
|
|
|
|
local a = Vector3.new(-4, -4, -4)
|
|
|
|
assert.are.equal(
|
2021-06-26 15:40:14 +02:00
|
|
|
-64,
|
|
|
|
a:area()
|
2021-06-26 15:26:40 +02:00
|
|
|
)
|
|
|
|
end)
|
|
|
|
it("should work with a mixed vector", function()
|
|
|
|
local a = Vector3.new(-3, 3, -3)
|
|
|
|
assert.are.equal(
|
2021-06-26 15:40:14 +02:00
|
|
|
27,
|
|
|
|
a:area()
|
2021-06-26 15:26:40 +02:00
|
|
|
)
|
|
|
|
end)
|
|
|
|
end)
|