We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2c3b2d commit e0bde26Copy full SHA for e0bde26
src/utils.ts
@@ -10,6 +10,6 @@ export const randUniform = (a: number, b: number): number => {
10
return Math.random() * (b - a) + a;
11
};
12
13
-export const randChoice = <T>(array: T[] | readonly T[]): T => {
+export const randChoice = <T>(array: readonly T[]): T => {
14
return array[Math.floor(Math.random() * array.length)];
15
0 commit comments