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

Function cartesianScale

docs/app/js/sanddance-app.js:132265–132271  ·  view source on GitHub ↗
(vector, k)

Source from the content-addressed store, hash-verified

132263 a[0] += b[0], a[1] += b[1], a[2] += b[2];
132264}
132265function cartesianScale(vector, k) {
132266 return [
132267 vector[0] * k,
132268 vector[1] * k,
132269 vector[2] * k
132270 ];
132271}
132272function cartesianNormalizeInPlace(d) {
132273 var l = (0, _mathJs.sqrt)(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
132274 d[0] /= l, d[1] /= l, d[2] /= l;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected