From e8068b14afe67a9d3e28f72625ce565a71894220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Przemys=C5=82aw=20Pluta?= Date: Fri, 27 Mar 2020 18:08:15 +0100 Subject: [PATCH] Updated smnp.math (markdown) --- smnp.math.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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