Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cocos/cocos-engine
/ getSpecRandomInt
Function
getSpecRandomInt
tests/core/test-serialize-node.js:9–11 ·
view source on GitHub ↗
(low, high)
Source
from the content-addressed store, hash-verified
7
}
8
9
function
getSpecRandomInt(low, high) {
10
return
Math.floor(Math.random() * (high - low) + low);
11
}
12
13
function
getRandomDouble() {
14
return
Math.random(0, 1000);
Callers
2
createNodeData
Function · 0.85
createNode
Function · 0.85
Calls
2
floor
Method · 0.45
random
Method · 0.45
Tested by
no test coverage detected