mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Added Vector.getMidpoint
This commit is contained in:
parent
555758288b
commit
a7530b7f89
@ -708,4 +708,19 @@ public class Vector {
|
||||
Math.max(v1.z, v2.z)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the midpoint of two vectors.
|
||||
*
|
||||
* @param v1
|
||||
* @param v2
|
||||
* @return maximum
|
||||
*/
|
||||
public static Vector getMidpoint(Vector v1, Vector v2) {
|
||||
return new Vector(
|
||||
(v1.x + v2.x) / 2,
|
||||
(v1.y + v2.y) / 2,
|
||||
(v1.z + v2.z) / 2
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user