aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/float.gleam2
-rw-r--r--src/gleam/int.gleam2
2 files changed, 2 insertions, 2 deletions
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: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#getting_a_random_number_between_two_values>
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: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#getting_a_random_integer_between_two_values>
float.random_between(to_float(min), to_float(max))