geforkt von Mirrors/Paper
Vector.getMidpoint should not modify the current Vector. Thanks TomyLobo for noticing.
By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
Ursprung
6a81f9ccab
Commit
4924569e95
@ -220,9 +220,9 @@ public class Vector implements Cloneable, ConfigurationSerializable {
|
|||||||
* @return a new midpoint vector
|
* @return a new midpoint vector
|
||||||
*/
|
*/
|
||||||
public Vector getMidpoint(Vector other) {
|
public Vector getMidpoint(Vector other) {
|
||||||
x = (x + other.x) / 2;
|
double x = (this.x + other.x) / 2;
|
||||||
y = (y + other.y) / 2;
|
double y = (this.y + other.y) / 2;
|
||||||
z = (z + other.z) / 2;
|
double z = (this.z + other.z) / 2;
|
||||||
return new Vector(x, y, z);
|
return new Vector(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren