MCPcopy Index your code
hub / github.com/processing/processing / heading

Method heading

core/src/processing/core/PVector.java:895–898  ·  view source on GitHub ↗

( 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

()

Source from the content-addressed store, hash-verified

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

Callers 1

heading2DMethod · 0.95

Calls 1

atan2Method · 0.80

Tested by

no test coverage detected