Enhance documentation with usage examples for random number generation utilities

This commit is contained in:
Palash Tyagi
2025-08-03 16:45:00 +01:00
parent f99f78d508
commit 18b9eef063
5 changed files with 49 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
//! Core traits for random number generators and sampling ranges.
//!
//! ```
//! use rustframe::random::{rng, Rng};
//! let mut r = rng();
//! let value: f64 = r.random_range(0.0..1.0);
//! assert!(value >= 0.0 && value < 1.0);
//! ```
use std::f64::consts::PI;
use std::ops::Range;