From 9ddbcf0395b9cd76cf1e648ed5a7a46a22830232 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Tue, 3 Jan 2012 01:12:25 +0100 Subject: [PATCH] Improved Vector.getMinimum and Vector.getMaximum. --- src/main/java/com/sk89q/worldedit/Vector.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/Vector.java b/src/main/java/com/sk89q/worldedit/Vector.java index c2986a64c..6fbcb4165 100644 --- a/src/main/java/com/sk89q/worldedit/Vector.java +++ b/src/main/java/com/sk89q/worldedit/Vector.java @@ -661,9 +661,10 @@ public class Vector { */ public static Vector getMinimum(Vector v1, Vector v2) { return new Vector( - Math.min(v1.getX(), v2.getX()), - Math.min(v1.getY(), v2.getY()), - Math.min(v1.getZ(), v2.getZ())); + Math.min(v1.x, v2.x), + Math.min(v1.y, v2.y), + Math.min(v1.z, v2.z) + ); } /** @@ -675,8 +676,9 @@ public class Vector { */ public static Vector getMaximum(Vector v1, Vector v2) { return new Vector( - Math.max(v1.getX(), v2.getX()), - Math.max(v1.getY(), v2.getY()), - Math.max(v1.getZ(), v2.getZ())); + Math.max(v1.x, v2.x), + Math.max(v1.y, v2.y), + Math.max(v1.z, v2.z) + ); } }