Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts.lib LCG Change example and update descriptions #456

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/scripting/scripts.lib/LCG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .LCG()
---

Takes a numerical seed and generates a random number based on the LCG RNG.
Takes a numerical seed and returns a function that generates PRNG based on the LCG 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();
my_seed = 12345;
const my_seed = 12345;
const rng = l.LCG(my_seed);

return l.LCG(my_seed);
return rng();
}
```
Loading