
        q.setFromRotationMatrix(m);
    }
    setQ(q);
    highlight('ip' + inputMode);
}
function getVector(root)
{
    vx = document.getElementById(root + "x").value;
    vy = document.getElementById(root + "y").value;
    vz = document.getElementById(root + "z").value;
    return new THREE.Vector3(vx, vy, vz);
}
function toRad(x)
{
    if (document.getElementById("iformatdeg").checked)
    {
        return x / 180 * Math.PI;
    }
    else
    {
        return x;
    }
}
function toAngle(x)
{
    if (do