mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Improved Vector.getMinimum and Vector.getMaximum.
This commit is contained in:
parent
6bbf167cb4
commit
9ddbcf0395
@ -661,9 +661,10 @@ public Vector2D toVector2D() {
|
||||
*/
|
||||
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 static Vector getMinimum(Vector v1, Vector v2) {
|
||||
*/
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user