[SPIGOT-3371] Yaw can be negative Created: 24/Jun/17  Updated: 11/Dec/17  Resolved: 24/Jun/17

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: user-98662 (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux 4.10.13-1-ARCH

Java 8 Headless



 Description   

Currently the method Location.getYaw() can return a value between -360 and 360. (Tested with player)
The docs however only report that the value can lie between 0 and 360. Please update the docs or the method. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Location.html#getYaw--



 Comments   
Comment by md_5 [ 24/Jun/17 ]

This should be obvious to anyone who has studied middle school levels maths, angles of -180, 650, -1040 etc are perfectly valid angles even if they are not in the range [0,360]. I have updated the documentation to reflect this, but I am surprised it is necessary.

Generated at Sat Dec 13 11:48:24 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.