mirror of
https://github.com/cc65/cc65.git
synced 2025-01-28 00:30:12 +00:00
more info about GetRandom vs. rand
git-svn-id: svn://svn.cc65.org/cc65/trunk@1500 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c8597283ef
commit
c9fb9cb7b4
@ -1245,7 +1245,12 @@ This function returns a random number. It can be also read from <tt/random/ e.g.
|
||||
a=random;
|
||||
</verb></tscreen>
|
||||
but by calling this function you are sure that the results will be always different.
|
||||
<tt/random/ is updated once a frame (50Hz PAL) and on every call to <tt/GetRandom/
|
||||
<tt/random/ is updated once a frame (50Hz PAL) and on every call to <tt/GetRandom/.
|
||||
<p>
|
||||
Note that it is not the same as <tt/rand/ function from the standard library. <tt/GetRandom/
|
||||
will give you unpredictable results (if IRQs will occur between calls to it) while
|
||||
<tt/rand/ conforms to the standard and for given seed (<tt/srand/) it always returns with the
|
||||
same sequence of values.
|
||||
|
||||
<sect2>SetDevice
|
||||
<p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user