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

Method normalizePitch

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

Normalizes the given pitch angle to a value between +/-90 degrees. @param pitch the pitch in degrees @return the normalized pitch in degrees @see Location#getPitch()

(float pitch)

Source from the content-addressed store, hash-verified

699 * @see Location#getPitch()
700 */
701 public static float normalizePitch(float pitch) {
702 if (pitch > 90.0f) {
703 pitch = 90.0f;
704 } else if (pitch < -90.0f) {
705 pitch = -90.0f;
706 }
707 return pitch;
708 }
709}

Callers 1

setRotationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected