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

Function setAxisAngle

docs/app/js/sanddance-app.js:75060–75068  ·  view source on GitHub ↗
(out, axis, rad)

Source from the content-addressed store, hash-verified

75058 return out;
75059}
75060function setAxisAngle(out, axis, rad) {
75061 rad = rad * 0.5;
75062 var s = Math.sin(rad);
75063 out[0] = s * axis[0];
75064 out[1] = s * axis[1];
75065 out[2] = s * axis[2];
75066 out[3] = Math.cos(rad);
75067 return out;
75068}
75069function getAxisAngle(out_axis, q) {
75070 var rad = Math.acos(q[3]) * 2.0;
75071 var s = Math.sin(rad / 2.0);

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected