Merge pull request #201 from nature-of-code/notion-update-docs

This commit is contained in:
Yifei Gao 2023-01-23 15:02:15 -05:00 committed by GitHub
commit c8d97cb397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 2 deletions

View file

@ -212,7 +212,7 @@
// A random floating point between 0 and 1
let r = random(1);
// If the random number is less than 0.1, sing!
if (r < prob) {
if (r < probability) {
print("Sing!");
}</pre>
<p>This method can also be applied to multiple outcomes. Lets say that singing has a 60% chance of happening, dancing, a 10% chance, and sleeping, a 30% chance. This can be implemented by picking a random number and seeing into what range it falls.</p>
@ -338,7 +338,7 @@
</div>
<pre class="codesplit" data-code-language="javascript"> void draw() {
//{!1} Here, x is a draw from a normal distribution with mean 320 and standard deviation 60
float x = randomGaussian(320, 60);
let x = randomGaussian(320, 60);
noStroke();
fill(0,10);
ellipse(x, 180, 16, 16);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 125 KiB