Finish with snaptotick. Work well with integer and small fractional part.
If you have suggestions how to improve algorithm - welcome)