rand()rand()

返回随机数。Returns a random number.

rand()
rand(1000)

语法Syntax

  • rand() - 返回一个 real 类型的值,该值在 [0.0, 1.0) 范围内均匀分布。rand() - returns a value of type real with a uniform distribution in the range [0.0, 1.0).
  • rand( N ) - 返回从集 {0.0, 1.0, ..., N - 1} 中选择的 real 类型的均匀分布的值。rand( N ) - returns a value of type real chosen with a uniform distribution from the set {0.0, 1.0, ..., N - 1}.