From 3467f9c5b60e45230d1d6dcf0b37b0cd62d43ba3 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Sat, 26 Jun 2021 21:39:16 -0700 Subject: [PATCH] fixed min and max --- worldeditadditions/utils/vector.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldeditadditions/utils/vector.lua b/worldeditadditions/utils/vector.lua index 4c767b4..7f330da 100644 --- a/worldeditadditions/utils/vector.lua +++ b/worldeditadditions/utils/vector.lua @@ -110,7 +110,7 @@ end -- @param pos2 Vector pos2 of the defined region. -- @return Vector Min values from input vectors. function worldeditadditions.vector.min(pos1, pos2) - return vector.new(math.min(pos1.x + pos2.x), math.min(pos1.y + pos2.y), math.min(pos1.z + pos2.z)) + return vector.new(math.min(pos1.x, pos2.x), math.min(pos1.y, pos2.y), math.min(pos1.z, pos2.z)) end --- Returns a vector of the max values of 2 positions. @@ -118,5 +118,5 @@ end -- @param pos2 Vector pos2 of the defined region. -- @return Vector Max values from input vectors. function worldeditadditions.vector.max(pos1, pos2) - return vector.new(math.max(pos1.x + pos2.x), math.max(pos1.y + pos2.y), math.max(pos1.z + pos2.z)) + return vector.new(math.max(pos1.x, pos2.x), math.max(pos1.y, pos2.y), math.max(pos1.z, pos2.z)) end