MCPcopy Create free account
hub / github.com/culvertsoft/mgen / checkFloat

Function checkFloat

mgen-javascriptlib/src/main/javascript/mgen-lib.js:499–506  ·  view source on GitHub ↗
(value, size, type)

Source from the content-addressed store, hash-verified

497 }
498
499 function checkFloat(value, size, type) {
500 if (typeof value === "undefined" || value === null) {
501 return;
502 }
503 if (!isNumeric(value)) {
504 throw Error("Tried to create " + type + " but data ( " + value + " ) was not a valid float.");
505 }
506 }
507
508 function hasFlag(fields, flag) {
509 return (fields.indexOf(flag) > -1);

Callers 1

createFieldOfTypeFunction · 0.85

Calls 1

isNumericFunction · 0.85

Tested by

no test coverage detected