Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tensorflow/tfjs
/ randomInt
Method
randomInt
tfjs-data/src/iterators/lazy_iterator.ts:1165–1167 ·
view source on GitHub ↗
(max: number)
Source
from the content-addressed store, hash-verified
1163
}
1164
1165
private randomInt(max: number) {
1166
return
Math.floor(this.random() * max);
1167
}
1168
1169
protected chooseIndex(): number {
1170
return
this.randomInt(this.buffer.length());
Callers
1
chooseIndex
Method · 0.95
Calls
1
floor
Method · 0.80
Tested by
no test coverage detected