Difference between revisions of "Rand"
Jump to navigation
Jump to search
Copied/adjusted DW's text from the talk page and added a note about converting to short
imported>Haama (Added algorithm info) |
imported>QQuix (Copied/adjusted DW's text from the talk page and added a note about converting to short) |
||
Line 12: | Line 12: | ||
==Notes== | ==Notes== | ||
*This function uses the [http://en.wikipedia.org/wiki/Mersenne_Twister Mersenne Twister algorithm]. | *This function uses the [http://en.wikipedia.org/wiki/Mersenne_Twister Mersenne Twister algorithm]. | ||
*Returns a float value with quite a few decimal places (and almost never a nice, round integer). Check the returned float against intervals (< 2, < 3, < 4, and so on) rather than against integers (==1, ==2, etc.). | |||
*Assigning the result to a Short var will truncate the decimals. (causing the Max value to almost never occur) | |||
==See Also== | ==See Also== |