Added related links to lerp() and PVector.lerp()

This commit is contained in:
Scott Murray
2014-04-08 08:54:57 -07:00
parent 7c23d482b7
commit a6c01affe9
3 changed files with 5 additions and 0 deletions

View File

@@ -5261,6 +5261,8 @@ public class PApplet extends Applet
* @param amt float between 0.0 and 1.0
* @see PGraphics#curvePoint(float, float, float, float, float)
* @see PGraphics#bezierPoint(float, float, float, float, float)
* @see PVector#lerp(PVector, float)
* @see PGraphics#lerpColor(int, int, float)
*/
static public final float lerp(float start, float stop, float amt) {
return start + (stop-start) * amt;
@@ -15334,6 +15336,7 @@ public class PApplet extends Applet
* @param amt between 0.0 and 1.0
* @see PImage#blendColor(int, int, int)
* @see PGraphics#color(float, float, float, float)
* @see PApplet#lerp(float, float, float)
*/
public int lerpColor(int c1, int c2, float amt) {
return g.lerpColor(c1, c2, amt);

View File

@@ -7637,6 +7637,7 @@ public class PGraphics extends PImage implements PConstants {
* @param amt between 0.0 and 1.0
* @see PImage#blendColor(int, int, int)
* @see PGraphics#color(float, float, float, float)
* @see PApplet#lerp(float, float, float)
*/
public int lerpColor(int c1, int c2, float amt) {
return lerpColor(c1, c2, amt, colorMode);

View File

@@ -880,6 +880,7 @@ public class PVector implements Serializable {
* @brief Linear interpolate the vector to another vector
* @param v the vector to lerp to
* @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.
* @see PApplet#lerp(float, float, float)
*/
public void lerp(PVector v, float amt) {
x = PApplet.lerp(x,v.x,amt);