Closed rwaldron closed 7 years ago
I'll only copy isInt8, because they all have the same issue, so no reason to repeat myself:
Number.isInt8(arg) Returns true if Number.isNumber(arg) is true and arg is an 8-bit signed integer in the range -2^7 <= arg <= -2^7-1.
-2^7 <= arg <= -2^7-1
When implemented as shown:
function isInt8(arg) { return (-Math.pow(2, 7)) <= arg <= (-Math.pow(2, 7) - 1); } isInt8(255) === false; isInt8(127) === false; isInt8(120) === false; isInt8(1) === false; isInt8(-1) === false;
This can likely be rolled into the fixes for #11, eg:
Number.isInt8(arg)
Note that there are two defects:
Sigh. Sorry about that. That's what I get for not proofreading
Don't sweat it! All quick fixes :)
I'll only copy isInt8, because they all have the same issue, so no reason to repeat myself:
When implemented as shown:
This can likely be rolled into the fixes for #11, eg:
Number.isInt8(arg)