MCPcopy Create free account
hub / github.com/esengine/esengine / random

Method random

packages/math/src/MathUtils.ts:221–223  ·  view source on GitHub ↗

* 生成指定范围内的随机数 * @param min 最小值(包含) * @param max 最大值(不包含) * @returns 随机数

(min: number = 0, max: number = 1)

Source from the content-addressed store, hash-verified

219 * @returns 随机数
220 */
221 static random(min: number = 0, max: number = 1): number {
222 return Math.random() * (max - min) + min;
223 }
224
225 /**
226 * 生成指定范围内的随机整数

Callers 15

addLayerMethod · 0.80
duplicateLayerMethod · 0.80
randomRangeFunction · 0.80
getShapeOffsetFunction · 0.80
updateMethod · 0.80
executeMethod · 0.80
shuffleIndicesMethod · 0.80
shuffleIndicesMethod · 0.80
generateIdFunction · 0.80
_getShapeOffsetMethod · 0.80
randomRangeFunction · 0.80
ToastProviderFunction · 0.80

Calls

no outgoing calls

Tested by 1

constructorMethod · 0.64