This function returns the value that is closest to the argument and is a mathematical integer. It rounds the input value to the nearest integer value either rounding up or down as necessary.
If the input value is equidistant from two integer values, the result is rounded up towards positive infinity. If the argument is already an integer, the argument itself is returned.
Special boundary conditions that affect the results are:
Note that Math.round(3.5) returns the value 4 while Math.round(-3.5) returns the value 3.