Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IMathlib::roundHalfToEvenInt ( P6INT32  noDecimal,
P6INT32  precision,
P6INT32 pRound 
)
pure virtual

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( 273, -1 ) results in 270
* roundHalfToEvenInt( -8500, -3 ) results in -8000
* 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
SuccessP6R::eOk 
FailureP6R::eInvalidArgOne of the parameters is NULL or inSize is zero.
P6R::eNotInitializedA successful call to initialize has not been done.