参考 randomSeed()

randomSeed()

random()randomGaussian() 函数设置种子值。

默认情况下,random()randomGaussian() 每次运行绘图时都会产生不同的结果。使用常量参数调用 randomSeed(),例如 randomSeed(99),会让这些函数每次运行绘图时产生相同的结果。

示例

语法

randomSeed(seed)

参数

seed

随机种子值

Notice any errors or typos? Please let us know. Please feel free to edit src/math/random.js and open a pull request!

相关参考