Round index to the configured opts.fractions.
425928
function (index) {
      // Get the closest top fraction.
      var fraction = Math.ceil(index % 1 * this.options.fractions) / this.options.fractions;
      // Truncate decimal trying to avoid float precission issues.
      var p = Math.pow(10, this.options.scale);
      return Math.floor(index) + Math.floor(fraction * p) / p;
    }
182769
def round_array(array_in):
    
    if isinstance(array_in, ndarray):
        return np.round(array_in).astype(int)
    else:
        return int(np.round(array_in))
690007
def roundClosestValid(val, res, decimals=None):
        
        if decimals is None and "." in str(res):
            decimals = len(str(res).split('.')[1])

        return round(round(val / res) * res, decimals)
530417
def round(round_sec = 1)
      down = self - (self.to_i % round_sec)
      up = down + round_sec

      difference_down = self - down
      difference_up = up - self

      if (difference_down < difference_up)
        return down
      else
        return up
      end
    end
29917
def round(self, x):
        
        fraction, scaled_x, scale = self._get_fraction(x)
        rounddown = fraction < .5
        if rounddown:
            result = math.floor(scaled_x) / scale
        else:
            result = math.ceil(scaled_x) / scale
        self._record_roundoff_error(x, result)
        return result
736073
public final void roundps(XMMRegister dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_ROUNDPS, dst, src, imm8);
  }
1265010
def scaleX(self, x):
        ''
        return round(self.plotviewBox.xmin+(x-self.visibleBox.xmin)*self.xScaler)
314657
def fraction(self, value: float) -> 'Size':
        """"""
        raise_not_number(value)
        self.maximum = '{}fr'.format(value)
        return self
877691
def round(self):
    """"""
    return Point(int(round(self.x)), int(round(self.y)))
1232985
function(ratio) {
			var target = this.target,
				a = this.a,
				i = a.length,
				e, val;
			if (this._round) {
				while (--i > -1) {
					e = a[i];
					target[e.i] = Math.round(e.s + e.c * ratio);
				}
			} else {
				while (--i > -1) {
					e = a[i];
					val = e.s + e.c * ratio;
					target[e.i] = (val < 0.000001 && val > -0.000001) ? 0 : val;
				}
			}
		}
1127289
def round(value)
      # If the number is within epsilon of X.5, round up (or down for negative
      # numbers).
      mod = value % 1
      mod_is_half = (mod - 0.5).abs < Script::Value::Number.epsilon
      if value > 0
        !mod_is_half && mod < 0.5 ? value.floor : value.ceil
      else
        mod_is_half || mod < 0.5 ? value.floor : value.ceil
      end
    end
167972
def _round(self, **kwargs):
        
        mathInfo = self._toMathInfo(guidelines=False)
        mathInfo = mathInfo.round()
        self._fromMathInfo(mathInfo, guidelines=False)
1284092
private void round() {
        this.v0 += this.v1;
        this.v2 += this.v3;
        this.v1 = rotateLeft(this.v1, 13);
        this.v3 = rotateLeft(this.v3, 16);

        this.v1 ^= this.v0;
        this.v3 ^= this.v2;
        this.v0 = rotateLeft(this.v0, 32);

        this.v2 += this.v1;
        this.v0 += this.v3;
        this.v1 = rotateLeft(this.v1, 17);
        this.v3 = rotateLeft(this.v3, 21);

        this.v1 ^= this.v2;
        this.v3 ^= this.v0;
        this.v2 = rotateLeft(this.v2, 32);
    }
565475
function roundToWithThousands(config, num, place) {
	var newval = 1 * unFormat(config, num);
	if (typeof(newval) == "number" && place != "none") {
		if (place <= 0) {
			var roundVal = -place;
			newval = +(Math.round(newval + "e+" + roundVal) + "e-" + roundVal);
		} else {
			var roundVal = place;
			var divval = "1e+" + roundVal;
			newval = +(Math.round(newval / divval)) * divval;
		}
	}
	newval = fmtChartJS(config, newval, "none");
	return (newval);
}
237128
def round_figures(x, n):
    """"""
    return round(x, int(n - math.ceil(math.log10(abs(x)))))
140107
public void round(int thePrecision) {
		if (getValue() != null) {
			BigDecimal newValue = getValue().round(new MathContext(thePrecision));
			setValue(newValue);
		}
	}
129734
function round(num, places) {
    const n = Math.pow(10, places);
    return Math.round(num * n) / n;
}