From 1fc21c57ece1a161c475ec12f1f5e32875f1a72a Mon Sep 17 00:00:00 2001 From: zacryol <60046681+zacryol@users.noreply.github.com> Date: Tue, 16 Mar 2021 15:05:06 -0600 Subject: [PATCH] Fix description of `randfn()` in Random number generation (#4759) --- tutorials/math/random_number_generation.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tutorials/math/random_number_generation.rst b/tutorials/math/random_number_generation.rst index 3f2c38252..49c717056 100644 --- a/tutorials/math/random_number_generation.rst +++ b/tutorials/math/random_number_generation.rst @@ -85,13 +85,11 @@ number between 0 and 1. This is useful to implement a other things. :ref:`randfn() ` returns a random -floating-point number between 0 and 1. Unlike :ref:`randf() -` which follows an uniform distribution, the -returned number follows a `normal distribution +floating-point number following a `normal distribution `__. This means the returned -value is more likely to be around 0.5 compared to the extreme bounds (0 and 1):: +value is more likely to be around the mean (0.0 by default), varying by the deviation (1.0 by default):: - # Prints a normally distributed floating-point number between 0.0 and 1.0. + # Prints a random floating-point number from a normal distribution with a mean 0.0 and deviation 1.0. var rng = RandomNumberGenerator.new() rng.randomize() print(rng.randfn())