MCPcopy Create free account
hub / github.com/DjDeveloperr/deno_desktop / fromAxisAngle

Method fromAxisAngle

examples/extern/gmath.bundle.js:1351–1355  ·  view source on GitHub ↗
(axis, angle)

Source from the content-addressed store, hash-verified

1349 return Matrix4.from(c, s, 0, 0, -s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1350 }
1351 static fromAxisAngle(axis, angle) {
1352 const [s, c] = angle.sincos();
1353 const c1 = 1 - c;
1354 return Matrix4.from(c1 * axis.x * axis.x + c, c1 * axis.x * axis.y + s * axis.z, c1 * axis.x * axis.z - s * axis.y, 0, c1 * axis.x * axis.y - s * axis.z, c1 * axis.y * axis.y + c, c1 * axis.y * axis.z + s * axis.x, 0, c1 * axis.x * axis.z + s * axis.y, c1 * axis.y * axis.z - s * axis.x, c1 * axis.z * axis.z + c, 0, 0, 0, 0, 1);
1355 }
1356 static fromQuaternion(quaternion) {
1357 const x2 = quaternion.vector.x + quaternion.vector.x;
1358 const y2 = quaternion.vector.y + quaternion.vector.y;

Callers

nothing calls this directly

Calls 2

sincosMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected