MCPcopy Create free account
hub / github.com/MaxBittker/rs-sdk / checkIsPositiveInt

Function checkIsPositiveInt

server/engine/src/util/JavaRandom.ts:58–62  ·  view source on GitHub ↗
(n: number, r = Number.MAX_SAFE_INTEGER)

Source from the content-addressed store, hash-verified

56}
57
58function checkIsPositiveInt(n: number, r = Number.MAX_SAFE_INTEGER) {
59 if (n < 0 || n > r) {
60 throw RangeError('number must be > 0');
61 }
62}
63
64class JavaRandom {
65 constructor(seedval?: number) {

Callers 2

setSeedMethod · 0.70
nextIntMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected