3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-09-19 22:30:05 +02:00

Optimized Vector[2D].containedWithin and Vector.equals slightly.

Dieser Commit ist enthalten in:
TomyLobo 2012-01-08 16:27:15 +01:00
Ursprung 99b0345ca6
Commit 4890c1ef9c
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -517,9 +517,9 @@ public class Vector {
* @return
*/
public boolean containedWithin(Vector min, Vector max) {
return x >= min.getX() && x <= max.getX()
&& y >= min.getY() && y <= max.getY()
&& z >= min.getZ() && z <= max.getZ();
return x >= min.x && x <= max.x
&& y >= min.y && y <= max.y
&& z >= min.z && z <= max.z;
}
/**
@ -679,7 +679,7 @@ public class Vector {
}
Vector other = (Vector) obj;
return other.getX() == this.x && other.getY() == this.y && other.getZ() == this.z;
return other.x == this.x && other.y == this.y && other.z == this.z;
}
/**

Datei anzeigen

@ -456,8 +456,8 @@ public class Vector2D {
* @return
*/
public boolean containedWithin(Vector2D min, Vector2D max) {
return x >= min.getX() && x <= max.getX()
&& z >= min.getZ() && z <= max.getZ();
return x >= min.x && x <= max.x
&& z >= min.z && z <= max.z;
}
/**