Revert "Revert "Revised roundTo""

This reverts commit 73f00d738b2b6b74615b0d8d28e4cc3997ff8999.