Updated smnp.math (markdown)

Bartłomiej Przemysław Pluta
2020-03-27 18:08:15 +01:00
parent 4158bef959
commit e8068b14af

@@ -1,10 +1,11 @@
# Functions
## random
```
random(min: int, max: int)
random(min: float, max: float)
random(min: int, max: int) #1
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
* `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]
```
## random
```
random()
```
Gets the random `float` value uniformly distributed between 0 (inclusive) and 1 (exclusive).