Rnd 啊 msdn里的 The Rnd function returns a value less than 1 but greater than or equal to zero.The value of number determines how Rnd generates a random number:For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.To produce random integers in a given range, use this formula:Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
msdn里的
The Rnd function returns a value less than 1 but greater than or equal to zero.The value of number determines how Rnd generates a random number:For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.To produce random integers in a given range, use this formula:Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Randomize
Round((Rnd(1) * 2 - 1) * 0.5 + 0.1, 1)"0.5","1"是你自己随机设定。我们的数据采集演示版本就是这样作的。