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

Function verifsint

MathBox/mathbox-bundle.js:48710–48715  ·  view source on GitHub ↗
(value, max, min)

Source from the content-addressed store, hash-verified

48708}
48709
48710function verifsint (value, max, min) {
48711 assert(typeof value === 'number', 'cannot write a non-number as a number')
48712 assert(value <= max, 'value larger than maximum allowed value')
48713 assert(value >= min, 'value smaller than minimum allowed value')
48714 assert(Math.floor(value) === value, 'value has a fractional component')
48715}
48716
48717function verifIEEE754 (value, max, min) {
48718 assert(typeof value === 'number', 'cannot write a non-number as a number')

Callers 3

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

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected