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 sfc32 Change example and update descriptions #459

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
5 changes: 3 additions & 2 deletions docs/scripting/scripts.lib/sfc32.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .sfc32()
---

A function that takes 4 seed parameters and gets a random number based on the sfc32 RNG.
A function that takes 4 seed parameters and returns a PRNG function based on the sfc32 algorithm.

## Syntax

Expand Down Expand Up @@ -41,7 +41,8 @@ function(context, args) {
const seed_2 = 4865874;
const seed_3 = 4242356;
const seed_4 = 9674544;
const rng = l.sfc32(seed_1, seed_2, seed_3, seed_4);

return l.sfc32(seed_1, seed_2, seed_3, seed_4);
return rng();
}
```
Loading