Skip to content

Commit

Permalink
nf() docs changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhilbisht798 committed Oct 10, 2024
1 parent ce330fb commit 8734142
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utilities/string_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,21 +250,21 @@ p5.prototype.matchAll = function(str, reg) {
*
* // Display the number as a string.
* let formatted = nf(number);
* text(formatted, 20, 25);
* text(formatted, 20, 20);
*
* let negative = nf(-number, 4, 2);
* text(negative, 20, 37);
* text(negative, 20, 40);
*
* // Display the number with four digits
* // to the left of the decimal.
* let left = nf(number, 4);
* text(left, 20, 50);
* text(left, 20, 60);
*
* // Display the number with four digits
* // to the left of the decimal and one
* // to the right.
* let right = nf(number, 4, 1);
* text(right, 20, 75);
* text(right, 20, 80);
*
* describe(
* 'The numbers "123.45", "0123.45", and "0123.5" written on three separate lines. The text is in black on a gray background.'
Expand Down

0 comments on commit 8734142

Please sign in to comment.