Difference between revisions of "RandG"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function RandG(const Variance: Extended): Extended; </source> ==Availability== SCAR Divi 3.28 > Current ==Description== Genera...") |
(No difference)
|
Revision as of 22:46, 19 October 2011
Definition
function RandG(const Variance: Extended): Extended;
Availability
SCAR Divi 3.28 > Current
Description
Generates a random extended value from the range [0, 1] using normal distribution with a given Variance. If the variance is lower, the random values will have bigger change of being closer to 0. The algorithm to calculate this is based on the Gauss function.
Example
var i: Integer; begin for i := 1 to 100 do WriteLn(RandG(2)); end.