Name

fromAngle()

Examples
v = PVector.fromAngle(0.01)
print(v)  # Prints "[ 0.99995, 0.009999833, 0.0 ]"
Description Calculates and returns a new 2D unit vector from the specified angle value (in radians).
Syntax
.fromAngle(angle)
.fromAngle(angle, target)
Parameters
anglefloat: the angle in radians
targetPVector: the target vector (if null, a new vector will be created)

Updated on Tue Feb 27 14:07:12 2024.

If you see any errors or have comments, please let us know.