FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added reference pages for new PVector methods · CamAwsum/processing@ffde2ae · GitHub

Repository navigation

Commit ffde2ae

Browse files
committed
Added reference pages for new PVector methods
1 parent 1a6dc47 commit ffde2ae

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

‎core/src/processing/core/PVector.java‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public void set(float[] source) {
207207
* @usage web_application
208208
* @return the random PVector
209209
* @brief Make a new 2D unit vector with a random direction.
210+
* @see PVector#random3D()
210211
*/
211212
static public PVector random2D() {
212213
return random2D(null,null);
@@ -233,8 +234,6 @@ static public PVector random2D(PVector target) {
233234

234235
/**
235236
* Make a new 2D unit vector with a random direction
236-
* @param parent current PApplet instance
237-
* @param target the target vector (if null, a new vector will be created)
238237
* @return the random PVector
239238
*/
240239
static public PVector random2D(PVector target, PApplet parent) {
@@ -253,6 +252,7 @@ static public PVector random2D(PVector target, PApplet parent) {
253252
* @usage web_application
254253
* @return the random PVector
255254
* @brief Make a new 3D unit vector with a random direction.
255+
* @see PVector#random2D()
256256
*/
257257
static public PVector random3D() {
258258
return random3D(null,null);
@@ -279,8 +279,6 @@ static public PVector random3D(PVector target) {
279279

280280
/**
281281
* Make a new 3D unit vector with a random direction
282-
* @param target the target vector (if null, a new vector will be created)
283-
* @param parent current PApplet instance
284282
* @return the random PVector
285283
*/
286284
static public PVector random3D(PVector target, PApplet parent) {
@@ -324,7 +322,7 @@ static public PVector fromAngle(float angle) {
324322

325323
/**
326324
* Make a new 2D unit vector from an angle
327-
* @param angle the angle
325+
*
328326
* @param target the target vector (if null, a new vector will be created)
329327
* @return the PVector
330328
*/
@@ -382,6 +380,7 @@ public float[] get(float[] target) {
382380
* @usage web_application
383381
* @brief Calculate the magnitude of the vector
384382
* @return magnitude (length) of the vector
383+
* @see PVector#magSq()
385384
*/
386385
public float mag() {
387386
return (float) Math.sqrt(x*x + y*y + z*z);
@@ -399,9 +398,9 @@ public float mag() {
399398
*
400399
* @webref pvector:method
401400
* @usage web_application
402-
* @brief Calculate the magnitude of the vector
401+
* @brief Calculate the magnitude of the vector, squared
403402
* @return squared magnitude of the vector
404-
*
403+
* @see PVector#mag()
405404
*/
406405
public float magSq() {
407406
return (x*x + y*y + z*z);
@@ -880,7 +879,7 @@ public PVector setMag(PVector target, float len) {
880879
* @webref pvector:method
881880
* @usage web_application
882881
* @return the angle of rotation
883-
* @brief SCalculate the angle of rotation for this vector
882+
* @brief Calculate the angle of rotation for this vector
884883
*/
885884
public float heading() {
886885
float angle = (float) Math.atan2(-y, x);
@@ -925,8 +924,8 @@ public void rotate(float theta) {
925924
* @usage web_application
926925
* @brief Linear interpolate the vector to another vector
927926
* @param v the vector to lerp to
928-
* @param amt The amt parameter is the amount to interpolate between the two vectors where 1.0 equal to the new vector
929-
* 0.1 is very near the new vector, 0.5 is half-way in between.
927+
* @param amt The amount of interpolation; some value between 0.0 (old vector) and 1.0 (new vector). 0.1 is very near the new vector. 0.5 is halfway in between.
928+
* @see PApplet#lerp(float, float, float)
930929
*/
931930
public void lerp(PVector v, float amt) {
932931
x = PApplet.lerp(x,v.x,amt);
@@ -938,9 +937,6 @@ public void lerp(PVector v, float amt) {
938937
* Linear interpolate between two vectors (returns a new PVector object)
939938
* @param v1 the vector
940939
* @param v2 the vector to lerp to
941-
* @param amt The amt parameter is the amount to interpolate between the two vectors where 1.0 equal to the new vector
942-
* 0.1 is very near the new vector, 0.5 is half-way in between.
943-
* @return the resulting lerped PVector
944940
*/
945941
public static PVector lerp(PVector v1, PVector v2, float amt) {
946942
PVector v = v1.get();
@@ -953,8 +949,6 @@ public static PVector lerp(PVector v1, PVector v2, float amt) {
953949
* @param x the x component to lerp to
954950
* @param y the y component to lerp to
955951
* @param z the z component to lerp to
956-
* @param amt The amt parameter is the amount to interpolate between the two vectors where 1.0 equal to the new vector
957-
* 0.1 is very near the new vector, 0.5 is half-way in between.
958952
*/
959953
public void lerp(float x, float y, float z, float amt) {
960954
this.x = PApplet.lerp(this.x,x,amt);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL