MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / verifsint

Function verifsint

MathBox/mathbox-core.js:2025–2030  ·  view source on GitHub ↗
(value, max, min)

Source from the content-addressed store, hash-verified

2023}
2024
2025function verifsint (value, max, min) {
2026 assert(typeof value === 'number', 'cannot write a non-number as a number')
2027 assert(value <= max, 'value larger than maximum allowed value')
2028 assert(value >= min, 'value smaller than minimum allowed value')
2029 assert(Math.floor(value) === value, 'value has a fractional component')
2030}
2031
2032function verifIEEE754 (value, max, min) {
2033 assert(typeof value === 'number', 'cannot write a non-number as a number')

Callers 3

mathbox-core.jsFile · 0.70
_writeInt16Function · 0.70
_writeInt32Function · 0.70

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected