MQL4 Reference
Math & Trig
MathRound
| double MathRound( |
double value) |
Returns value rounded to the nearest integer of the specified numeric value.
Parameters:
| value |
- |
Numeric value to be rounded. |
Sample:
double y=MathRound(2.8);
Print("The round of 2.8 is ",y);
y=MathRound(2.4);
Print("The round of -2.4 is ",y);
//Output: The round of 2.8 is 3
// The round of -2.4 is -2
|
|
|