mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-14 11:43:48 +01:00
Vector.getMidpoint should not modify the current Vector. Thanks TomyLobo for noticing.
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
6a81f9ccab
commit
4924569e95
1 changed files with 3 additions and 3 deletions
|
@ -220,9 +220,9 @@ public class Vector implements Cloneable, ConfigurationSerializable {
|
|||
* @return a new midpoint vector
|
||||
*/
|
||||
public Vector getMidpoint(Vector other) {
|
||||
x = (x + other.x) / 2;
|
||||
y = (y + other.y) / 2;
|
||||
z = (z + other.z) / 2;
|
||||
double x = (this.x + other.x) / 2;
|
||||
double y = (this.y + other.y) / 2;
|
||||
double z = (this.z + other.z) / 2;
|
||||
return new Vector(x, y, z);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue