Get the value of the nearest integer. The fraction 0.5 will round in a direction chosen by the implementation. Do not expect that the result of
math.round(0.5) will be the same across all platforms!
result = math.round(x)
- The value.
- The nearest integer to x.
- This function implies the argument type based on the first argument. As such, you may not use table shorthand for the first argument if it is supposed to be a vector.
- While it seems like this function might overwrite the equivalent function in the Lua standard library, it does not. Lua doesn't actually provide a