Calculate the angle of rotation for this vector (only 2D vectors) @webref pvector:method @usage web_application @return the angle of rotation @webBrief Calculate the angle of rotation for this vector
()
| 857 | * @webBrief Calculate the angle of rotation for this vector |
| 858 | */ |
| 859 | public float heading() { |
| 860 | float angle = (float) Math.atan2(y, x); |
| 861 | return angle; |
| 862 | } |
| 863 | |
| 864 | |
| 865 | @Deprecated |