Cross Platform Rnd() Consistency
Monkey Forums/Monkey Programming/Cross Platform Rnd() Consistency
| ||
I'm guessing probably not but... Is it possible to create a random generator that behaves exactly the same over many platforms? |
| ||
Yes. Monkey's Rnd should be one. If you're seeing inconsistencies with the standard Monkey one then I'd guess it's due to double/float differences. What problems are you seeing? |
| ||
Oh wow... you can probably ignore me, I could've sworn they generated different figures, but they don't! Oops. |
| ||
mmm... that's interesting and quite useful. |
| ||
really? I wrote my own random number module for this purpose. oh well ;-) |
| ||
I only checked XNA and HTML5 at this time, but ignoring precision (which is fine for me), they generate the same numbers |
| ||
I have an integer rand() in the code section that clones the version from MSVC. |