Added a roundTo function for a template helper function.