@syncfusion/ej2-base 31.1.17 → 31.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5867,6 +5867,10 @@ class NumberFormat$1 {
5867
5867
  * @param {NumberFormatOptions} [option] ?
5868
5868
  * @returns {string} ?
5869
5869
  */
5870
+ static roundTo(value, digits) {
5871
+ const factor = Math.pow(10, digits);
5872
+ return (Math.round(value * factor) / factor).toFixed(digits);
5873
+ }
5870
5874
  static processFraction(value, min, max, option) {
5871
5875
  const temp = (value + '').split('.')[1];
5872
5876
  const length = temp ? temp.length : 0;
@@ -5885,7 +5889,7 @@ class NumberFormat$1 {
5885
5889
  return value.toFixed(min);
5886
5890
  }
5887
5891
  else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
5888
- return value.toFixed(max);
5892
+ return this.roundTo(value, max);
5889
5893
  }
5890
5894
  let str = value + '';
5891
5895
  if (str[0] === '0' && option && option.format === '###.00') {