Expand description
Cross-platform random number generation for FEAGI evolution.
Uses platform-specific implementations:
- Desktop/Server:
randcrate (fast, native) - WASM/Browser: JavaScript’s
crypto.getRandomValues()(Web Crypto API)
Copyright 2025 Neuraville Inc. Licensed under the Apache License, Version 2.0
Functions§
- random_
bytes - Fill buffer with random bytes
- random_
f32 - Generate random f32 in range [0.0, 1.0)
- random_
f64 - Generate random f64 in range [0.0, 1.0)
- random_
range - Generate random integer in range [min, max)
- random_
u64 - Generate random u64 (useful for IDs, seeds, etc.)