code: function (x, a, b) {
              if (x < a) {
                  return a;
              } else if (x > b) {
                  return b;
              }
              return x;
          }
docs: Clamp x to range [a,b]
  @param   {number} x The value to clamp
  @param   {number} a Low value
  @param   {number} b High value
  @returns {number}   The clamped value