Name

normalize()

Examples
v = PVector(10, 20, 2)
v.normalize()
print(v)  # Prints "[ 0.4454354, 0.8908708, 0.089087084 ]"
Description Normalize the vector to length 1 (make it a unit vector).
Syntax
.normalize()
.normalize(target)
Parameters
targetPVector: Set to null to create a new vector

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

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