Appearance
Round2BR
Declaration
Function Round2BR( aValue : Extended; aDigit : integer) : Extended
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := Round2BR(123.455,2) //result is 123.46
end;Description
Returns aValue rounded to the number of decimal places given by aDigit. This function performs biased rounding (bankers rounding). This means that 5 is always rounded to the nearest even number
Refer to Round2 and Round2Up for a function that rounds using unbiased rounding (traditional rounding).
Examples of rounding ...
Round2BR(123.454,2) = 123.45
Round2BR(123.455,2) = 123.46
Round2BR(123.456,2) = 123.46
Round2BR(123.464,2) = 123.46
Round2BR(123.465,2) = 123.46
Round2BR(123.466,2) = 123.47