feat: Add fastrand for PRNG support

Replaces the custom LCG implementation with `fastrand` for improved
random number generation.
This commit introduces the `fastrand` crate to the project for robust
and efficient pseudo-random number generation.
The `Environment` struct now includes a `prng` field to hold the random
number generator.
The built-in `random` function now utilizes this PRNG for generating
floating-point random numbers.
A new `seed!` function is added to allow users to seed the PRNG for
deterministic random sequences.
This change enhances the randomness capabilities of the language, making
it suitable for simulations and other applications requiring good
quality random numbers.
This commit is contained in:
Michael Schimmel
2026-02-22 09:08:16 +01:00
parent df06c51205
commit 6605f56756
5 changed files with 299 additions and 226 deletions
Generated
+1
View File
@@ -1915,6 +1915,7 @@ dependencies = [
"chrono",
"clap",
"eframe",
"fastrand",
"insta",
"regex",
]