UNPKG

gamekit-utils

Version:

Minimal, fast and useful utilities for randomness, array manipulation and math — built for games, UI logic and generative design.

8 lines (7 loc) 185 B
/** * Returns true with the given percentage chance (0–100). * * @example * chance(25) // ~25% chance to return true */ export declare function chance(percent: number): boolean;