The functions math.random and math.randomseed are interfaces to the simple random generator functions rand and srand that are provided by ANSI C. When called without arguments, math.random returns a pseudo-random real number in the range [0,1). When called with a number n, math.random returns a pseudo-random integer in the range [1,n]. When called with two arguments, l and u, math.random returns a pseudo-random integer in the range [l,u]. The math.randomseed function sets a "seed" for the pseudo-random generator: Equal seeds produce equal sequences of numbers.
| Attributes | Values |
|---|
| rdfs:label
| |
| rdfs:comment
| - The functions math.random and math.randomseed are interfaces to the simple random generator functions rand and srand that are provided by ANSI C. When called without arguments, math.random returns a pseudo-random real number in the range [0,1). When called with a number n, math.random returns a pseudo-random integer in the range [1,n]. When called with two arguments, l and u, math.random returns a pseudo-random integer in the range [l,u]. The math.randomseed function sets a "seed" for the pseudo-random generator: Equal seeds produce equal sequences of numbers.
|
| dbkwik:wowwiki/pro...iPageUsesTemplate
| |
| abstract
| - The functions math.random and math.randomseed are interfaces to the simple random generator functions rand and srand that are provided by ANSI C. When called without arguments, math.random returns a pseudo-random real number in the range [0,1). When called with a number n, math.random returns a pseudo-random integer in the range [1,n]. When called with two arguments, l and u, math.random returns a pseudo-random integer in the range [l,u]. The math.randomseed function sets a "seed" for the pseudo-random generator: Equal seeds produce equal sequences of numbers.
|