MCPcopy Create free account
hub / github.com/benfry/processing4 / round

Method round

core/src/processing/core/PApplet.java:4521–4523  ·  view source on GitHub ↗

Calculates the integer closest to the n parameter. For example, round(133.8) returns the value 134. @webref math:calculation @webBrief Calculates the integer closest to the value parameter @param n number to round @see PApplet#floor(float) @see PApplet#ceil(float)

(float n)

Source from the content-addressed store, hash-verified

4519 * @see PApplet#ceil(float)
4520 */
4521 static public final int round(float n) {
4522 return Math.round(n);
4523 }
4524
4525
4526 static public final float mag(float a, float b) {

Callers 6

lerpColorMethod · 0.95
saveTargetAsyncMethod · 0.95
displayDensityImplMethod · 0.80
drawMethod · 0.80
boundedMethod · 0.80
checkRetinaMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected