Skip to content

Commit bd111bb

Browse files
authored
Merge pull request #655 from Arya-Gupta/main
Improved documentation for lerpColor() function
2 parents 9bf5c61 + 4e573bb commit bd111bb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/src/processing/core/PApplet.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9639,10 +9639,11 @@ public final int color(float v1, float v2, float v3, float alpha) {
96399639

96409640
/**
96419641
*
9642-
* Calculates a <b>color</b> between two colors at a specific increment. The
9643-
* <b>amt</b> parameter is the amount to interpolate between the two values
9644-
* where 0.0 is equal to the first point, 0.1 is very near the first point,
9645-
* 0.5 is halfway in between, etc. <br />
9642+
* Calculates a new <b>color</b> that is a blend of two other colors. The <b>amt</b> parameter
9643+
* controls the amount of each color to use where an amount of 0.0 will produce
9644+
* the first color, 1.0 will return the second color, and 0.5 is halfway in
9645+
* between. Values between 0.0 and 1.0 will interpolate between the two colors in
9646+
* that proportion. <br />
96469647
* An amount below 0 will be treated as 0. Likewise, amounts above 1 will be
96479648
* capped at 1. This is different from the behavior of <b>lerp()</b>, but necessary
96489649
* because otherwise numbers outside the range will produce strange and

0 commit comments

Comments
 (0)