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

Method setHeading

core/src/processing/core/PVector.java:871–876  ·  view source on GitHub ↗
(float angle)

Source from the content-addressed store, hash-verified

869
870
871 public PVector setHeading(float angle) {
872 float m = mag();
873 x = (float) (m * Math.cos(angle));
874 y = (float) (m * Math.sin(angle));
875 return this;
876 }
877
878
879 /**

Callers

nothing calls this directly

Calls 3

magMethod · 0.95
cosMethod · 0.45
sinMethod · 0.45

Tested by

no test coverage detected