MCPcopy Index your code
hub / github.com/benfry/processing4 / heading

Method heading

core/src/processing/core/PVector.java:859–862  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 1

heading2DMethod · 0.95

Calls 1

atan2Method · 0.80

Tested by

no test coverage detected