1 public class MyRandom {
6 public MyRandom(int iseed, float v1, float v2) {
12 public float update() {
15 float scale= (float)4.656612875e-10;
19 int imod = 2147483647;
26 is1 = (iseed-is2)/32768;
29 is1 = (is1 * imult+(iss2-is2) / 32768) % (65536);
31 iseed = (is1 * 32768 + is2) % imod;
44 //System.printI(0xb1);
48 //System.printI(0xb2);
49 v1 = (float)2.0 * u1 - (float)1.0;
50 v2 = (float)2.0 * u2 - (float)1.0;
52 //System.printI(0xb3);
53 //} while (s >= (float)1.0);
55 //System.printI(0xb4);
56 r = Math.sqrtf((float)(-2.0*Math.logf(s))/(float)s);
57 //System.printI(0xb5);