Skip to main content Link Menu Expand (external link) Document Search Copy Copied

PVector(double x, double y, double z)

This constructor creates a new PVector with the given x, y, and z values. There really isn’t very much to say about this constructor, it just sets x, y, and z to the parameters.

Parameters

  • x - The x value of the vector
  • y - The y value of the vector
  • z - The z value of the vector

Example

PVector v = PVector(1.0, 2.0, 3.0);
/*
v.x == 1.0
v.y == 2.0
v.z == 3.0
*/

See Also