fix roundTo for cpp