Name

rotate()

Examples
v = PVector(10.0, 20.0)
print(v)  # Prints "[ 10.0, 20.0, 0.0 ]"
v.rotate(HALF_PI)
print(v)  # Prints "[ -20.0, 9.999999, 0.0 ]"
Description Rotates a vector by the specified angle (2D vectors only), while maintaining the same magnitude.
Syntax
.rotate(theta)
Parameters
thetafloat: the angle of rotation

Updated on Mon Sep 21 15:53:25 2020.

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