MCPcopy Index your code
hub / github.com/plotly/plotly.js / eulerFromQuaternion

Function eulerFromQuaternion

src/plots/geo/zoom.js:431–437  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

429 return vectorOut;
430}
431function eulerFromQuaternion(q) {
432 return [
433 Math.atan2(2 * (q[0] * q[1] + q[2] * q[3]), 1 - 2 * (q[1] * q[1] + q[2] * q[2])) * degrees,
434 Math.asin(Math.max(-1, Math.min(1, 2 * (q[0] * q[2] - q[3] * q[1])))) * degrees,
435 Math.atan2(2 * (q[0] * q[3] + q[1] * q[2]), 1 - 2 * (q[2] * q[2] + q[3] * q[3])) * degrees
436 ];
437}
438
439function cartesian(spherical) {
440 var lambda = spherical[0] * radians;

Callers 1

zoomClippedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…