Add jsdoc and unit tests for util functions
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* Returns a random integer between from and to, including from, excluding to.
|
||||
* @param fromInclusive Lower bound, inclusive.
|
||||
* @param toExclusive Upper Bound, exclusive.
|
||||
*/
|
||||
export function randomInt(fromInclusive: number, toExclusive: number): number {
|
||||
return (
|
||||
Math.floor(Math.random() * (toExclusive - fromInclusive)) + fromInclusive
|
||||
|
||||
Reference in New Issue
Block a user