random2D static method

PVector random2D()

( begin auto-generated from PVector_random2D.xml )

Make 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. You can also pass in a target PVector to fill.

@webref pvector:method @usage web_application @return the random PVector @brief Make a new 2D unit vector with a random direction. @see PVector#random3D()

Implementation

static PVector random2D() {
  return random2D_v3(null, null);
}