Hi all, What are the ways of implementation of "round to nearest" function. It is an analogue of matlab "round" function. For example: -2.5 is rounded to -3 2.5 is rounded to 3 Thanks in advance, Daniel
Three steps: 1. memorize sign (positive or negative value) 2. round the absolute (positive) value (if >=0.5 then round up) 3. apply sign from step 1 to result