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

Method magnitude

docs/app/js/sanddance-app.js:69157–69159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69155 return Math.sqrt(this.lengthSquared());
69156 }
69157 magnitude() {
69158 return this.len();
69159 }
69160 lengthSquared() {
69161 let length = 0;
69162 for(let i = 0; i < this.ELEMENTS; ++i)length += this[i] * this[i];

Callers 1

normalizeMethod · 0.95

Calls 1

lenMethod · 0.95

Tested by

no test coverage detected