refactored code, hopefully simplifying things a bit. for cvar/cvt we do the rounding only at the end after we have summed the scaled deltas to avoid introducing unnecessary rounding errors.
refactored code, hopefully simplifying things a bit. for cvar/cvt we do the rounding only at the end after we have summed the scaled deltas to avoid introducing unnecessary rounding errors.