Skip to content

Commit 8734142

Browse files
committed
nf() docs changed
1 parent ce330fb commit 8734142

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utilities/string_functions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,21 +250,21 @@ p5.prototype.matchAll = function(str, reg) {
250250
*
251251
* // Display the number as a string.
252252
* let formatted = nf(number);
253-
* text(formatted, 20, 25);
253+
* text(formatted, 20, 20);
254254
*
255255
* let negative = nf(-number, 4, 2);
256-
* text(negative, 20, 37);
256+
* text(negative, 20, 40);
257257
*
258258
* // Display the number with four digits
259259
* // to the left of the decimal.
260260
* let left = nf(number, 4);
261-
* text(left, 20, 50);
261+
* text(left, 20, 60);
262262
*
263263
* // Display the number with four digits
264264
* // to the left of the decimal and one
265265
* // to the right.
266266
* let right = nf(number, 4, 1);
267-
* text(right, 20, 75);
267+
* text(right, 20, 80);
268268
*
269269
* describe(
270270
* 'The numbers "123.45", "0123.45", and "0123.5" written on three separate lines. The text is in black on a gray background.'

0 commit comments

Comments
 (0)