diff --git a/mops.toml b/mops.toml index d2d5842..9812108 100644 --- a/mops.toml +++ b/mops.toml @@ -3,10 +3,10 @@ base = "0.12.0" [package] name = "xtended-random" -version = "1.0.0" +version = "1.0.1" description = "A library for random helper funtions" repository = "https://github.com/edjcase/motoko_random" -keywords = [ "random", "pseudo" ] +keywords = [ "random", "pseudo", "rng" ] license = "MIT" [dev-dependencies] diff --git a/src/PseudoRandomX.mo b/src/PseudoRandomX.mo index ba4146e..829f09d 100644 --- a/src/PseudoRandomX.mo +++ b/src/PseudoRandomX.mo @@ -130,7 +130,7 @@ module { currentSeed; }; - /// Generates a random integer within the specified range (exclusive). + /// Generates a random integer within the specified range (inclusive min, exclusive max). /// /// ```motoko include=import /// let prng : PseudoRandomGenerator = ...; @@ -145,7 +145,7 @@ module { min + (Nat32.toNat(randNat32) % rangeSize); }; - /// Generates a random natural number within the specified range (inclusive). + /// Generates a random natural number within the specified range (inclusive min, exclusive max). /// /// ```motoko include=import /// let prng : PseudoRandomGenerator = ...; diff --git a/src/RandomX.mo b/src/RandomX.mo index 052cb5e..2c5ded8 100644 --- a/src/RandomX.mo +++ b/src/RandomX.mo @@ -63,7 +63,7 @@ module { ?(randValue <= trueCount); }; - /// Generates a random integer within the specified range (inclusive). + /// Generates a random integer within the specified range (inclusive min, exclusive max). /// Returns null if there's not enough entropy. /// /// ```motoko include=import @@ -89,7 +89,7 @@ module { ?randInt; }; - /// Generates a random natural number within the specified range (inclusive). + /// Generates a random natural number within the specified range (inclusive min, exclusive max). /// Returns null if there's not enough entropy. /// /// ```motoko include=import