MCPcopy Index your code
hub / github.com/PaperMC/Paper / angle

Method angle

paper-api/src/main/java/org/bukkit/util/Vector.java:212–216  ·  view source on GitHub ↗

Gets the angle between this vector and another in radians. @param other The other vector @return angle in radians

(@NotNull Vector other)

Source from the content-addressed store, hash-verified

210 * @return angle in radians
211 */
212 public float angle(@NotNull Vector other) {
213 double dot = Doubles.constrainToRange(dot(other) / (length() * other.length()), -1.0, 1.0);
214
215 return (float) Math.acos(dot);
216 }
217
218 /**
219 * Sets this vector to the midpoint between this vector and another.

Callers 2

testSmallAngleMethod · 0.95

Calls 2

dotMethod · 0.95
lengthMethod · 0.95

Tested by 2

testSmallAngleMethod · 0.76