Skip to content

Commit 28f794d

Browse files
committed
New math methods: cb(float) & cb(int)
New buddy math methods for sq()! Returns the 3rd power of the passed argument. ⬛
1 parent 239710e commit 28f794d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

core/src/processing/core/PApplet.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4815,6 +4815,25 @@ static public final float sq(float n) {
48154815
return n*n;
48164816
}
48174817

4818+
/**
4819+
* ( begin auto-generated from cb.xml )
4820+
*
4821+
* Cubes a number (multiplies a number by its square).
4822+
*
4823+
* ( end auto-generated )
4824+
* @webref math:calculation
4825+
* @param n number to cube
4826+
* @see PApplet#cbrt(float)
4827+
*/
4828+
4829+
static public final float cb(float n) {
4830+
return n*n*n;
4831+
}
4832+
4833+
static public final int cb(int n) {
4834+
return n*n*n;
4835+
}
4836+
48184837
/**
48194838
* ( begin auto-generated from sqrt.xml )
48204839
*

0 commit comments

Comments
 (0)