I was searching for a function which, given a float, will restore an int of the float amazed or adjusted to the closest int. Is there something like this built-in or accessible in a module?
The accompanying code gets the job done however I try not to waste time.
_, d = divmod(number, 1)
if d > 0.5: