| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1a6dc47 commit ffde2ae
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -207,6 +207,7 @@ public void set(float[] source) { | |||
| 207 | 207 | * @usage web_application | |
| 208 | 208 | * @return the random PVector | |
| 209 | 209 | * @brief Make a new 2D unit vector with a random direction. | |
| 210 | + * @see PVector#random3D() | ||
| 210 | 211 | */ | |
| 211 | 212 | static public PVector random2D() { | |
| 212 | 213 | return random2D(null,null); | |
@@ -233,8 +234,6 @@ static public PVector random2D(PVector target) { | |||
| 233 | 234 | ||
| 234 | 235 | /** | |
| 235 | 236 | * 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) | ||
| 238 | 237 | * @return the random PVector | |
| 239 | 238 | */ | |
| 240 | 239 | static public PVector random2D(PVector target, PApplet parent) { | |
@@ -253,6 +252,7 @@ static public PVector random2D(PVector target, PApplet parent) { | |||
| 253 | 252 | * @usage web_application | |
| 254 | 253 | * @return the random PVector | |
| 255 | 254 | * @brief Make a new 3D unit vector with a random direction. | |
| 255 | + * @see PVector#random2D() | ||
| 256 | 256 | */ | |
| 257 | 257 | static public PVector random3D() { | |
| 258 | 258 | return random3D(null,null); | |
@@ -279,8 +279,6 @@ static public PVector random3D(PVector target) { | |||
| 279 | 279 | ||
| 280 | 280 | /** | |
| 281 | 281 | * 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 | ||
| 284 | 282 | * @return the random PVector | |
| 285 | 283 | */ | |
| 286 | 284 | static public PVector random3D(PVector target, PApplet parent) { | |
@@ -324,7 +322,7 @@ static public PVector fromAngle(float angle) { | |||
| 324 | 322 | ||
| 325 | 323 | /** | |
| 326 | 324 | * Make a new 2D unit vector from an angle | |
| 327 | - * @param angle the angle | ||
| 325 | + * | ||
| 328 | 326 | * @param target the target vector (if null, a new vector will be created) | |
| 329 | 327 | * @return the PVector | |
| 330 | 328 | */ | |
@@ -382,6 +380,7 @@ public float[] get(float[] target) { | |||
| 382 | 380 | * @usage web_application | |
| 383 | 381 | * @brief Calculate the magnitude of the vector | |
| 384 | 382 | * @return magnitude (length) of the vector | |
| 383 | + * @see PVector#magSq() | ||
| 385 | 384 | */ | |
| 386 | 385 | public float mag() { | |
| 387 | 386 | return (float) Math.sqrt(x*x + y*y + z*z); | |
@@ -399,9 +398,9 @@ public float mag() { | |||
| 399 | 398 | * | |
| 400 | 399 | * @webref pvector:method | |
| 401 | 400 | * @usage web_application | |
| 402 | - * @brief Calculate the magnitude of the vector | ||
| 401 | + * @brief Calculate the magnitude of the vector, squared | ||
| 403 | 402 | * @return squared magnitude of the vector | |
| 404 | - * | ||
| 403 | + * @see PVector#mag() | ||
| 405 | 404 | */ | |
| 406 | 405 | public float magSq() { | |
| 407 | 406 | return (x*x + y*y + z*z); | |
@@ -880,7 +879,7 @@ public PVector setMag(PVector target, float len) { | |||
| 880 | 879 | * @webref pvector:method | |
| 881 | 880 | * @usage web_application | |
| 882 | 881 | * @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 | ||
| 884 | 883 | */ | |
| 885 | 884 | public float heading() { | |
| 886 | 885 | float angle = (float) Math.atan2(-y, x); | |
@@ -925,8 +924,8 @@ public void rotate(float theta) { | |||
| 925 | 924 | * @usage web_application | |
| 926 | 925 | * @brief Linear interpolate the vector to another vector | |
| 927 | 926 | * @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) | ||
| 930 | 929 | */ | |
| 931 | 930 | public void lerp(PVector v, float amt) { | |
| 932 | 931 | x = PApplet.lerp(x,v.x,amt); | |
@@ -938,9 +937,6 @@ public void lerp(PVector v, float amt) { | |||
| 938 | 937 | * Linear interpolate between two vectors (returns a new PVector object) | |
| 939 | 938 | * @param v1 the vector | |
| 940 | 939 | * @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 | ||
| 944 | 940 | */ | |
| 945 | 941 | public static PVector lerp(PVector v1, PVector v2, float amt) { | |
| 946 | 942 | PVector v = v1.get(); | |
@@ -953,8 +949,6 @@ public static PVector lerp(PVector v1, PVector v2, float amt) { | |||
| 953 | 949 | * @param x the x component to lerp to | |
| 954 | 950 | * @param y the y component to lerp to | |
| 955 | 951 | * @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. | ||
| 958 | 952 | */ | |
| 959 | 953 | public void lerp(float x, float y, float z, float amt) { | |
| 960 | 954 | this.x = PApplet.lerp(this.x,x,amt); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments