randomInt
Returns a random integer value in interval [start, end).
Added in v0.0.3
Usage
ts
import { randomInt } from 'parsnip-kit'
randomInt() // a random integer in [0, 10)
randomInt(0, 1024) // a random integer in [0, 1024)API
Type Parameter
Arguments
| Arg | Type | Optional | Default | Description |
|---|---|---|---|---|
start | number | true | 0 | The left boundary of the interval |
end | number | true | 10 | The right boundary of the interval |
Returns
| Type |
|---|
number |