From 71ac24aef38a16a35ba7326d06fbd5ae67f5cff0 Mon Sep 17 00:00:00 2001 From: CyberneticX-Tech <138270143+CyberneticX-Tech@users.noreply.github.com> Date: Mon, 7 Sep 2026 22:37:36 -0700 Subject: [PATCH] docs: fix angle unit in quick start example (#1837) The ranged sampling example in src/lib.rs samples an angle from -PI..PI, which corresponds to radians rather than degrees. Fixes #1837 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 930988dbcd..70867a03ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ //! //! // Ranged sampling: //! use std::f32::consts::PI; -//! println!("Angle: {} degrees", rand::random_range(-PI..PI)); +//! println!("Angle: {} radians", rand::random_range(-PI..PI)); //! ``` //! //! See also [The Book: Quick Start](https://rust-random.github.io/book/quick-start.html).