Name

random2D()

Examples
v = PVector.random2D()
print(v)
# May print something like:
# [ -0.75006354, -0.6613658, 0.0 ] or 
# [ 0.13742635, 0.990512, 0.0 ] or 
# [ -0.9456181, -0.32527903, 0.0 ]
Description Returns a new 2D unit vector with a random direction. If you pass in this as an argument, it will use the PApplet's random number generator.
Syntax
.random2D()
.random2D(parent)
.random2D(target)
.random2D(target, parent)
Parameters
parentPApplet: current PApplet instance
targetPVector: the target vector (if null, a new vector will be created)
Related random3D()

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

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