Strange Random numbers
Monkey Forums/Monkey Programming/Strange Random numbers
| ||
This is killing me. I have a method addParticle which I call it from my emitter.update here I have this line: myParticle[p].rot = Rnd(0, 360) my 'emitter' is calling this method every a few milliseconds and look here what rotations I receive: 287.1472978591919 301.09920501708984 312.8187847137451 326.77067041397095 340.7225561141968 354.6744418144226 8.486809730529785 20.20638942718506 31.92599058151245 45.87787628173828 59.69024419784546 73.64212989807129 87.59401559829712 101.6854190826416 115.49778699874878 127.21736669540405 141.02973461151123 152.74933576583862 164.4689154624939 178.28128337860107 190.00086307525635 203.81323099136353 215.5328106880188 227.2524118423462 241.06477975845337 first number is always random. after that every next generation is incremented and so on... |
| ||
how and how often do you set the seed for the random numbers? |
| ||
that was the problem. i had the Seed = millisescs() in the same addParticle method :) thanks. |