Skip to content

Commit

Permalink
scripts.lib mulberry32 Change example and update descriptions
Browse files Browse the repository at this point in the history
Changed description to indicate returns function
Changed return to indicate returns function
Changed example to return function call
  • Loading branch information
ghambhackmud authored May 8, 2024
1 parent 6bfa9ec commit f61d358
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/scripting/scripts.lib/mulberry32.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

### Return

Returns a number.
Returns a function.

## Example

```js
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();
}
```

0 comments on commit f61d358

Please sign in to comment.