Hello,
I could say as I can take the integer part of a division but with rounding?
example:
int (5/3) = 1, but 5/3 = 1.66 or 2, the function leaves with 1 int but I want it to round 2 ..
Thanks
function inc
-
- Posts: 1803
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: function inc
You could write a user-defined function that will round all of your values. The trick to doing this is to add 0.5 to the value and then call the int function.
function round(value)
round = int(value + 0.5);
end;
round = int(value + 0.5);
end;