Fast real valued random generator in java

后端 未结 6 1428
借酒劲吻你
借酒劲吻你 2020-12-31 12:51

java.util.Random.nextDouble() is slow for me and I need something really fast.

I did some google search and I\'ve found only integers based fast random generators.

6条回答
  •  迷失自我
    2020-12-31 13:27

    You could create an array of random doubles when you init your program and then just repeat it. This is much faster but the random values reapeat themselfs.

提交回复
热议问题