Added number util function for getRandomInt
• Added: - number util function for getRandomInt
This commit is contained in:
parent
4cb54447f4
commit
a38d9f6133
@ -16,3 +16,9 @@ export const shortNumberFormat = (number) => {
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
export const getRandomInt = (min, max) => {
|
||||
min = Math.ceil(min)
|
||||
max = Math.floor(max)
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user