参考 randomSeed()

randomSeed()

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

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

示例

语法

randomSeed(seed)

参数

seed
数字:

随机种子值

This page is generated from the comments in src/math/random.js . Please feel free to edit it and submit a pull request!

相关参考