MCPcopy Create free account
hub / github.com/Teneted/Tenet / getMidpoint

Method getMidpoint

src/main/java/org/bukkit/util/Vector.java:231–237  ·  view source on GitHub ↗

Gets a new midpoint vector between this vector and another. @param other The other vector @return a new midpoint vector

(@NotNull Vector other)

Source from the content-addressed store, hash-verified

229 * @return a new midpoint vector
230 */
231 @NotNull
232 public Vector getMidpoint(@NotNull Vector other) {
233 double x = (this.x + other.x) / 2;
234 double y = (this.y + other.y) / 2;
235 double z = (this.z + other.z) / 2;
236 return new Vector(x, y, z);
237 }
238
239 /**
240 * Performs scalar multiplication, multiplying all components with a

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected