mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Added related links to lerp() and PVector.lerp()
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user