java.lang.Math.random() calls the native javascript Math.random(). However, java.util.Random implements the random number algorithm specified in the spec for that class - you can try using that if java.lang.Math.random() is not random enough
On Jan 11, 6:19 am, Kevin Jordan <[email protected]> wrote: > All GWT's emulation does is natively call the javascript > Math.random(). > > On Jan 11, 3:02 am, darkflame <[email protected]> wrote: > > > > > > > > > I have been playing about drawing fractals in GWT using canvas and the > > ¨ chaos game¨ method. > > > However when picking large amounts of random numbers I seem to be > > getting a bias. That is, the randomness doesn't seem evenly > > distributed. > > I have read many sources online that say that Javas normal > > Math.Random() is flawed for this stuff, and some alternatives are > > offered. However as GWTś Math.Random is merely an emulation, I > > wondered if it suffered the same flaws or not. > > Does anyone use alternative methods? > > > This is all rather new too me, so if anyone has any pointers it would > > be helpfull. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
