Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-12 22:20:08 +01:00
Added Vector.toVector2D and Vector2D.toVector.
Dieser Commit ist enthalten in:
Ursprung
35230d12d8
Commit
f11415f451
@ -619,6 +619,15 @@ public class Vector {
|
|||||||
return new BlockVector(this);
|
return new BlockVector(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a 2D vector by dropping the Y component from this vector.
|
||||||
|
*
|
||||||
|
* @return Vector2D
|
||||||
|
*/
|
||||||
|
public Vector2D toVector2D() {
|
||||||
|
return new Vector2D(x, z);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the dot product of this and another vector.
|
* Gets the dot product of this and another vector.
|
||||||
*
|
*
|
||||||
|
@ -190,4 +190,13 @@ public class Vector2D {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "(" + x + ", " + z + ")";
|
return "(" + x + ", " + z + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a 3D vector by adding a zero Y component to this vector.
|
||||||
|
*
|
||||||
|
* @return Vector
|
||||||
|
*/
|
||||||
|
public Vector toVector() {
|
||||||
|
return new Vector(x, 0, z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren