UNPKG

slanted-gamedev-toolz

Version:

A slanted mix of tools for your brilliant ideas in game design.

10 lines (9 loc) 359 B
/** * Checks if a number exceeds JavaScript's `Number.MAX_SAFE_INTEGER` (±9007199254740991). * * @param number - The number to check. * @returns `true` if the absolute value of the number is greater than `Number.MAX_SAFE_INTEGER`, otherwise `false`. */ export function isNumberTooLarge(number) { return Math.abs(number) > Number.MAX_SAFE_INTEGER; }