-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rand and randf functions for generating random numbers
- Loading branch information
1 parent
a14adc4
commit 167cc95
Showing
5 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h3>rand() function</h3> | ||
Returns a random integer within the range specified by the minimum and | ||
maximum argument (inclusive). | ||
<br> | ||
This function takes two arguments. | ||
<h4>Syntax</h4> | ||
<code>rand(min, max)</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>min</code> - an integer representing the smallest possible random number desired.<br> | ||
<code>max</code> - an integer representing the largest possible random number desired. | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>rand(1, 10) → 8</code><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h3>rand() function</h3> | ||
Returns a random float within the range specified by the minimum and | ||
maximum argument (inclusive). | ||
<br> | ||
This function takes two arguments. | ||
<h4>Syntax</h4> | ||
<code>randf(min, max)</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>min</code> - a float representing the smallest possible random number desired.<br> | ||
<code>max</code> - a float representing the largest possible random number desired. | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>randf(1, 10) → 4.59258286403147</code><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters