RoundToInt
Introduction
The RoundToInt method can be used to round a float or double value to an integer value. The return value is rounded as an integer which allows for == checks without having to worry about loss of precision.
Code examples
RoundToInt can be used to convert floats to integers
It will do mathematical rounding as well:
Last updated