code: function _getEulerAngles(q) {
    var poleSum = q.x * q.w - q.y * q.z;
    if (util.doublesEqual(poleSum, 0.5))
      return {"x": 90, "y": 0, "z": 0};
    else if (util.doublesEqual(poleSum, -0.5))
      return {"x": -90, "y": 0, "z": 0};
  
    var sqw = q.w * q.w;
    var sqx = q.x * q.x;
    var sqy = q.y * q.y;
    var sqz = q.z * q.z;
  
    //var _x = Math.atan2(2 * q.x * q.w - 2 * q.y * q.z, 1 - 2 * sqx  - 2 * sqz);
    var _x = Math.asin(2 * q.x * q.w - 2 * q.y * q.z)
    //var _y = Math.atan2(2 * q.y * q.w - 2 * q.x * q.z, 1 - 2 * sqy  - 2 * sqz);
    var _y = Math.atan2(2 * q.x * q.z + 2 * q.y * q.w, 1 - 2 * sqy - 2 * sqx);
    //var _z = Math.asin(2 * q.x * q.y + 2 * q.z * q.w);
    var _z = Math.PI - Math.atan2(2 * q.x * q.y + 2 * q.z * q.w, 1 - 2 * sqy - 2 * sqw);
  
    return {
      "x": _normalizeRad(_x),
      "y": _normalizeRad(_y),
      "z": _normalizeRad(_z)
    };
  }
docs: Returns the euler angles for the given quaternion
  The rotations for the euler angles are applied in the order: z then x then y
  
  @param {Quternion} quaternion
  @returns {Object} eulerAngles: {x:_, y:_, z:_}