From 80fc4269867e514c813526eec302d3695b5a023b Mon Sep 17 00:00:00 2001 From: inoas Date: Tue, 12 Apr 2022 00:10:53 +0200 Subject: comments --- src/gleam/float.gleam | 2 +- src/gleam/int.gleam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gleam/float.gleam b/src/gleam/float.gleam index 20fd6c8..6f19b13 100644 --- a/src/gleam/float.gleam +++ b/src/gleam/float.gleam @@ -351,7 +351,7 @@ if javascript { pub fn random_between(min: Float, max: Float) -> Float { // ```javascript - // return Math.floor(Math.random() * (max - min + 1) + min); // The maximum is/shuould-be exclusive + // return Math.floor(Math.random() * (max - min + 1) + min); // The maximum is/should-be exclusive // ``` // See: random_uniform() *. { max -. min } +. min diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam index 9da5c97..418d4fb 100644 --- a/src/gleam/int.gleam +++ b/src/gleam/int.gleam @@ -398,7 +398,7 @@ pub fn random_between(min: Int, max: Int) -> Int { // ```javascript // min = Math.ceil(min); // max = Math.floor(max); - // return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is + // return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive // ``` // See: float.random_between(to_float(min), to_float(max)) -- cgit v1.2.3