Difference between revisions of "FastRandom"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns a seemingly-random (much less random than Random, though it is faster) int in the range 0 to the given max int. </onlyinclude> <syntaxhighlight lang="cp...") |
Shadlington (Talk | contribs) |
||
Line 2: | Line 2: | ||
Returns a seemingly-random (much less random than [[Random]], though it is faster) int in the range 0 to the given max int. | Returns a seemingly-random (much less random than [[Random]], though it is faster) int in the range 0 to the given max int. | ||
</onlyinclude> | </onlyinclude> | ||
+ | |||
+ | This method is part of the Maths namespace so you need to prefix calls to it with 'Maths::'. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | int FastRandom(int max, int seed) | + | int Maths::FastRandom(int max, int seed) |
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Global Functions]] | [[Category:Global Functions]] |
Latest revision as of 22:25, 6 September 2012
Returns a seemingly-random (much less random than Random, though it is faster) int in the range 0 to the given max int.
This method is part of the Maths namespace so you need to prefix calls to it with 'Maths::'.
int Maths::FastRandom(int max, int seed)