This method performs rounding to a specified number of decimal points for an integer (i.e., the precision parameter).
Rounding is done so that an even value is selected if the two possible values are equally close. The following are examples of this method in use:
* roundHalfToEvenInt( 999, 4 ) results in 999
* roundHalfToEvenInt( 999, 0 ) results in 999
*
- Parameters
-
noDecimal | [ in ] An integer value with no decimal point |
precision | [ in ] If the value is zero or positive then the value in "noDecimal" is not modified. If the value is negative, then the precision defines the number of zeros needed at the end of noDecimal. |
pRound | [ out ] see examples above |
- Returns
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | One of the parameters is NULL or inSize is zero. |
P6R::eNotInitialized | A successful call to initialize has not been done. |