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

Method midpoint

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

Sets this vector to the midpoint between this vector and another. @param other The other vector @return this same vector (now a midpoint)

(@NotNull Vector other)

Source from the content-addressed store, hash-verified

215 * @return this same vector (now a midpoint)
216 */
217 @NotNull
218 public Vector midpoint(@NotNull Vector other) {
219 x = (x + other.x) / 2;
220 y = (y + other.y) / 2;
221 z = (z + other.z) / 2;
222 return this;
223 }
224
225 /**
226 * Gets a new midpoint vector between this vector and another.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected