mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
simplifying PVector heading(), fixes #3511
This commit is contained in:
@@ -874,8 +874,8 @@ public class PVector implements Serializable {
|
||||
* @brief Calculate the angle of rotation for this vector
|
||||
*/
|
||||
public float heading() {
|
||||
float angle = (float) Math.atan2(-y, x);
|
||||
return -1*angle;
|
||||
float angle = (float) Math.atan2(y, x);
|
||||
return angle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user