mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 03:21:23 +00:00
7 lines
180 B
TypeScript
7 lines
180 B
TypeScript
import { GetRandomInt } from "./GetRandomInt";
|
|
|
|
export function GetRandomArrayValue<T>(array: Array<T>) : T {
|
|
let index = GetRandomInt(0, array.length);
|
|
return array[index];
|
|
}
|