Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
long y = Math.round(x);
y = (x + 1/2r).floor
y = floor (x + 1/2)
var
y: integer;
x: double;
begin
y := round(x);
end.
$y = (int) round($x);
my $y = int($x + 1/2);
let y = x.round() as i64;
y = Kernel.round x
var y = Math.round(x);
function round(float)
return math.floor(float + .5)
end
y = int(x + 0.5)
integer :: y
y = nint(x)
(define y (round x))
var y = x.round();
Y : constant Integer := Integer (Float'Rounding (X));
(defun rnd (y) (floor (+ y 0.5)))
(defn rnd [y] (int (+ y 0.5)))