diff --git a/smnp.math.md b/smnp.math.md index 2d060ea..f0c3b8e 100644 --- a/smnp.math.md +++ b/smnp.math.md @@ -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 @@ -80,10 +81,4 @@ Returns a list contained of integers from `begin` (inclusive) to `end` (exclusiv #### Example ``` 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). \ No newline at end of file +``` \ No newline at end of file