code: function getRotateDeg() {
        if (settings.rotateRatio === 0) {
          return 0;
        }
  
        if (Math.random() > settings.rotateRatio) {
          return 0;
        }
  
        if (rotationRange === 0) {
          return minRotation;
        }
  
        if (rotationSteps > 0) {
          // Min rotation + zero or more steps * span of one step
          return minRotation +
            Math.floor(Math.random() * rotationSteps) *
            rotationRange / (rotationSteps - 1);
        }
        else {
          return minRotation + Math.random() * rotationRange;
        }
      }
docs: /* Get the deg of rotation according to settings, and luck.