( begin auto-generated from PVector_setMag.xml ) Calculate the angle of rotation for this vector (only 2D vectors) ( end auto-generated ) @webref pvector:method @usage web_application @return the angle of rotation @brief Calculate the angle of rotation for this vector
()
| 893 | * @brief Calculate the angle of rotation for this vector |
| 894 | */ |
| 895 | public float heading() { |
| 896 | float angle = (float) Math.atan2(y, x); |
| 897 | return angle; |
| 898 | } |
| 899 | |
| 900 | |
| 901 | @Deprecated |