Updated smnp.math (markdown)
13
smnp.math.md
13
smnp.math.md
@@ -1,10 +1,11 @@
|
|||||||
# Functions
|
# Functions
|
||||||
## random
|
## random
|
||||||
```
|
```
|
||||||
random(min: int, max: int)
|
random(min: int, max: int) #1
|
||||||
random(min: float, max: float)
|
random(min: float, max: float) #2
|
||||||
|
random() #3
|
||||||
```
|
```
|
||||||
Returns a random number from a given range _exclusively_.
|
Returns a random number from a given range _exclusively_ (`#1`, `#2`). Returns the random `float` value uniformly distributed between 0 (inclusive) and 1 (exclusive) if no argument passed (`#3`).
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
* `int` if passed arguments are of `int` type
|
* `int` if passed arguments are of `int` type
|
||||||
@@ -81,9 +82,3 @@ Returns a list contained of integers from `begin` (inclusive) to `end` (exclusiv
|
|||||||
```
|
```
|
||||||
println(range(4, 20, 2)); # [4, 6, 8, 10, 12, 14, 16, 18]
|
println(range(4, 20, 2)); # [4, 6, 8, 10, 12, 14, 16, 18]
|
||||||
```
|
```
|
||||||
|
|
||||||
## random
|
|
||||||
```
|
|
||||||
random()
|
|
||||||
```
|
|
||||||
Gets the random `float` value uniformly distributed between 0 (inclusive) and 1 (exclusive).
|
|
||||||
Reference in New Issue
Block a user