Skip to content

Commit f61d358

Browse files
authored
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
1 parent 6bfa9ec commit f61d358

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/scripting/scripts.lib/mulberry32.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .mulberry32()
33
---
44

5-
A function that gets a random number from a numerical seed based on the mulberry32 RNG.
5+
A function that returns a PRNG function from a numerical seed based on the mulberry32 algorithm.
66

77
## Syntax
88

@@ -18,15 +18,16 @@ The number to serve as the seed for RNG.
1818

1919
### Return
2020

21-
Returns a number.
21+
Returns a function.
2222

2323
## Example
2424

2525
```js
2626
function(context, args) {
2727
const l = #fs.scripts.lib();
2828
const my_number = 1337;
29+
const rng = l.mulberry32(my_number);
2930

30-
return l.mulberry32(my_number);
31+
return rng();
3132
}
3233
```

0 commit comments

Comments
 (0)