MCPcopy Create free account
hub / github.com/circircir-circle/human_exist_device / rand

Method rand

mini_program/common/Tools.js:43–45  ·  view source on GitHub ↗

* 返回指定范围内的一个整数 * @param {Number} min * @param {Number} max * @return {String}

(min, max)

Source from the content-addressed store, hash-verified

41 * @return {String}
42 */
43 rand(min, max) {
44 return Math.floor(Math.random() * (max - min + 1) + min)
45 }
46
47 /**
48 * 生成字符串组合

Callers 2

randStringMethod · 0.95
randFilenameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected