mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
Merge pull request #1690 from processing/PVectorShiffman
adding set() to accept 2 parameters for 2D vectors only
This commit is contained in:
@@ -149,11 +149,10 @@ public class PVector implements Serializable {
|
||||
this.z = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from PVector_set.xml )
|
||||
*
|
||||
* Sets the x, y, and z component of the vector using three separate
|
||||
* Sets the x, y, and z component of the vector using two or three separate
|
||||
* variables, the data from a PVector, or the values from a float array.
|
||||
*
|
||||
* ( end auto-generated )
|
||||
@@ -170,6 +169,17 @@ public class PVector implements Serializable {
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @webref pvector:method
|
||||
* @param x the x component of the vector
|
||||
* @param y the y component of the vector
|
||||
* @brief Set the x, y components of the vector
|
||||
*/
|
||||
public void set(float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param v any variable of type PVector
|
||||
|
||||
Reference in New Issue
Block a user