"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function computeOrientationFlexibly(x, y, z) {
    if (x === 0 && y === 0 && z === 0) {
        return { x: x, y: y, z: z, w: 0 };
    }
    var hx = x * 0.5;
    var hy = y * 0.5;
    var hz = z * 0.5;
    var sx = Math.sin(hx);
    var sy = Math.sin(hy);
    var sz = Math.sin(hz);
    var cx = Math.cos(hx);
    var cy = Math.cos(hy);
    var cz = Math.cos(hz);
    var sysz = sy * sz;
    var cysz = cy * sz;
    var sycz = sy * cz;
    var cycz = cy * cz;
    return {
        x: sx * cycz + cx * sysz,
        y: cx * sycz - sx * cysz,
        z: cx * cysz + sx * sycz,
        w: cx * cycz - sx * sysz,
    };
}
exports.default = computeOrientationFlexibly;
//# sourceMappingURL=computeOrientationFlexibly.js.map