From 99e485ecf52922f20b7d63148b8558c8ecfbf2cd Mon Sep 17 00:00:00 2001 From: shiffman Date: Sun, 4 Sep 2011 19:03:33 +0000 Subject: [PATCH] fixing up some reference things in PVector --- core/src/processing/core/PVector.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java index 464f3731e..6f0b5cacb 100644 --- a/core/src/processing/core/PVector.java +++ b/core/src/processing/core/PVector.java @@ -358,9 +358,12 @@ public class PVector implements Serializable { return sub(v1, v2, null); } -/** - * @param target ??? - */ + /** + * Subtract one vector from another and store in another vector + * @param v1 the x, y, and z components of a PVector object + * @param v2 the x, y, and z components of a PVector object + * @param target PVector to store the result + */ static public PVector sub(PVector v1, PVector v2, PVector target) { if (target == null) { target = new PVector(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z); @@ -426,6 +429,7 @@ public class PVector implements Serializable { return mult(v1, v2, null); } + static public PVector mult(PVector v1, PVector v2, PVector target) { if (target == null) { target = new PVector(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z); @@ -466,7 +470,10 @@ public class PVector implements Serializable { } /** - * @param target ??? + * Divide a vector by a scalar and store the result in another vector. + * @param v any variable of type PVector + * @param n the number to divide with the vector + * @param target PVector to store the result */ static public PVector div(PVector v, float n, PVector target) { if (target == null) {