code: function tolerancesToString(values, tolerances) {
      let str = '{';
      const props = [];
      if (typeof values !== 'object' && typeof values !== 'undefined') {
          if (typeof tolerances === 'undefined') {
              return values;
          }
          else if (typeof tolerances !== 'object') {
              const tolerance = Math.abs(tolerances);
              return `[${Math.max(values - tolerance, 0)}, ${Math.max(values + tolerance, 0)}]`;
          }
      }
      else {
          for (const p in values) {
              if (values.hasOwnProperty(p)) {
                  const value = values[p];
                  let valueStr = '';
                  if (tolerances && typeof tolerances[p] !== 'undefined' && tolerances[p] !== 0) {
                      const tolerance = Math.abs(tolerances[p]);
                      valueStr = `[${Math.max(value - tolerance, 0)}, ${Math.max(value + tolerance, 0)}]`;
                  }
                  else {
                      valueStr = `${value}`;
                  }
                  props.push(`${p}: ${valueStr}`);
              }
          }
      }
      str += props.join(', ');
      return `${str}}`;
  }
docs: Prints values with tolerances as a string.
  
  @param values a number or an object with values of type number
  @param tolerances a number or an object with values of type number