Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - pseudorandom number
Search - pseudorandom number - List
DL : 0
将自定义的整数随机数生成器编写为一个类,该类使用一个公式从上一个随机数的到下一个伪随机数。随机数程序以某个“启动源(seed)”值开始。其后,通过对当前随机数执行某个运算得到下一个随机数,运算使当前随机数变成另一个(明显随机的)数。适用于整数的公式为:nextR=((oldR*25173)+13849) 65536; 它产生0~65536之间的数。为了得到看起来随机的好结果,该公式中几个特定的数已经给出。-The custom integer random number generators are written as a class, the class using a formula from the previous random number to the next pseudorandom number. Random number procedure to a "start source (seed)" value. Subsequently, by performing an operation on current number of random is the next random number, computing the current random number into another (clearly random) number. Applied to integers is: nextR= ((oldR*25173) +13849) 65536 It creates between the 0~65536 number. In order to get good results of seemingly random, some specific number has been given in the formula.
Date : 2025-12-16 Size : 62kb User : 慕容丹丹
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.