UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

11 lines 350 B
/** * just in case you need that function also * @param {Vector3} axis * @param {number} angle * @param {Quaternion} result */ export function quat3_createFromAxisAngle(axis, angle, result) { const halfAngle = angle * .5; const s = Math.sin(halfAngle); result.set(axis.x * s, axis.y * s, axis.z * s, Math.cos(halfAngle)); }