From f61d358dc886bf0d201956ab4a19e8e8926dadee Mon Sep 17 00:00:00 2001 From: ghambhackmud <144021787+ghambhackmud@users.noreply.github.com> Date: Wed, 8 May 2024 02:34:17 -0400 Subject: [PATCH] scripts.lib mulberry32 Change example and update descriptions Changed description to indicate returns function Changed return to indicate returns function Changed example to return function call --- docs/scripting/scripts.lib/mulberry32.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/scripting/scripts.lib/mulberry32.mdx b/docs/scripting/scripts.lib/mulberry32.mdx index ebd18bdd..0985c1b0 100644 --- a/docs/scripting/scripts.lib/mulberry32.mdx +++ b/docs/scripting/scripts.lib/mulberry32.mdx @@ -2,7 +2,7 @@ title: .mulberry32() --- -A function that gets a random number from a numerical seed based on the mulberry32 RNG. +A function that returns a PRNG function from a numerical seed based on the mulberry32 algorithm. ## Syntax @@ -18,7 +18,7 @@ The number to serve as the seed for RNG. ### Return -Returns a number. +Returns a function. ## Example @@ -26,7 +26,8 @@ Returns a number. function(context, args) { const l = #fs.scripts.lib(); const my_number = 1337; + const rng = l.mulberry32(my_number); - return l.mulberry32(my_number); + return rng(); } ```