Anonymous user
Random number generator (included): Difference between revisions
Random number generator (included) (view source)
Revision as of 10:05, 28 January 2010
, 14 years ago→{{header|Java}}
(Add J) |
|||
Line 17:
=={{header|Java}}==
Java's <code>Random</code> class uses a [[wp:Linear congruential generator|Linear congruential formula]], as described in [http://java.sun.com/javase/6/docs/api/java/util/Random.html its documentation]. The commonly used <code>Math.random()</code> uses a <code>Random</code> object under the hood.
=={{header|Lua}}==
Lua's <code>math.random()</code> is an interface to the C <code>rand()</code> function provided by the OS libc; its implementation varies by platform.
=={{header|OCaml}}==
|