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

Method normalizeYaw

src/main/java/org/bukkit/Location.java:683–691  ·  view source on GitHub ↗

Normalizes the given yaw angle to a value between +/-180 degrees. @param yaw the yaw in degrees @return the normalized yaw in degrees @see Location#getYaw()

(float yaw)

Source from the content-addressed store, hash-verified

681 * @see Location#getYaw()
682 */
683 public static float normalizeYaw(float yaw) {
684 yaw %= 360.0f;
685 if (yaw >= 180.0f) {
686 yaw -= 360.0f;
687 } else if (yaw < -180.0f) {
688 yaw += 360.0f;
689 }
690 return yaw;
691 }
692
693 /**
694 * Normalizes the given pitch angle to a value between <code>+/-90</code>

Callers 1

setRotationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected