MCPcopy Index your code
hub / github.com/benfry/processing4 / nfs

Method nfs

core/src/processing/core/PApplet.java:9127–9129  ·  view source on GitHub ↗

Utility function for formatting numbers into strings. Similar to nf() but leaves a blank space in front of positive numbers, so they align with negative numbers in spite of the minus symbol. There are two versions, one for formatting floats and one for formatting ints. The values for the d

(int num, int digits)

Source from the content-addressed store, hash-verified

9125 * @see PApplet#nfc(float, int)
9126 */
9127 static public String nfs(int num, int digits) {
9128 return (num < 0) ? nf(num, digits) : (' ' + nf(num, digits));
9129 }
9130
9131
9132 /**

Callers 3

textMethod · 0.95
printMethod · 0.95
printMethod · 0.95

Calls 1

nfMethod · 0.95

Tested by

no test coverage detected