MRound(Value: Double; Precision: Double): Double;
Value. Rounded value.
Precision. Rounding precision.
The MRound method returns a number rounded with the specified precision.
Rounding up is done if the remainder from dividing the number by precision is greater or equal to a half of precision.
The Divisor parameter value cannot be equal to 0.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Math.MRound(10, 3);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the rounding result equal to 9.
See also: