code: function clip(n, minValue, maxValue) {
      return Math.min(Math.max(n, minValue), maxValue);
  }
docs: / <summary> / clips a number to the specified minimum and maximum values. / </summary> / <param name="n">The number to clip.</param> / <param name="minValue">Minimum allowable value.</param> / <param name="maxValue">Maximum allowable value.</param> / <returns>The clipped value.</returns>