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

Method fromAxisAngle

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

Source from the content-addressed store, hash-verified

1045 return Matrix3.from(c, s, 0, -s, c, 0, 0, 0, 1);
1046 }
1047 static fromAxisAngle(axis, angle) {
1048 const [s, c] = angle.sincos();
1049 const c1 = 1 - c;
1050 return Matrix3.from(c1 * axis.x * axis.x + c, c1 * axis.x * axis.y + s * axis.z, c1 * axis.x * axis.z - s * axis.y, c1 * axis.x * axis.y - s * axis.z, c1 * axis.y * axis.y + c, c1 * axis.y * axis.z + s * axis.x, c1 * axis.x * axis.z + s * axis.y, c1 * axis.y * axis.z - s * axis.x, c1 * axis.z * axis.z + c);
1051 }
1052 static fromTranslation(translation) {
1053 return Matrix3.from(1, 0, 0, 0, 1, 0, translation.x, translation.y, 1);
1054 }

Callers 1

fromArcMethod · 0.45

Calls 2

sincosMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected