MCPcopy Create free account
hub / github.com/microsoft/SandDance / validateVector

Function validateVector

docs/app/js/sanddance-app.js:69547–69553  ·  view source on GitHub ↗
(v, length)

Source from the content-addressed store, hash-verified

69545parcelHelpers.export(exports, "deprecated", ()=>deprecated);
69546var _common = require("./common");
69547function validateVector(v, length) {
69548 if (v.length !== length) return false;
69549 for(let i = 0; i < v.length; ++i){
69550 if (!Number.isFinite(v[i])) return false;
69551 }
69552 return true;
69553}
69554function checkNumber(value) {
69555 if (!Number.isFinite(value)) throw new Error("Invalid number ".concat(value));
69556 return value;

Callers 1

checkVectorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected