I have a randomly generated float from the random library, and I want to shorten it to any number of places, based on some other number.
Example:
input = 4.06098152
processing the number, rounding to thousandths place
output = 4.061
How would I do this?