Reference+
Name
setHeading()
Class
PVector
Description
Sets the angle this vector makes with the positive X axis (only 2D vectors) This is equivalent to changing the vector's direction to the given value.
Syntax
myPVector.setHeading(angle)
Parameters
myPVector
(PVector)
your PVector objectangle
(float)
the direction of the resultant vector
Return
PVector
Related

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.