[Gambas-user] Rounding numbers to pre-set increments
M0E Lnx
m0e.lnx at ...626...
Thu Apr 30 21:00:06 CEST 2009
This dilema is running circles around my head... I need help
I need a way to take a number, say an integer and round it up to the
nearest increment of 250. This may imply decreasing or increasing the
number.
For instance
input = 400
I need my app to round up to 500
input = 550
I need my app to round down to 500
The input values come from a text file provided to my from another
coworker, which means that using a spinbox is out of the question. I
have no control over what is fed to the app, it just needs to round
up/down to 250 cut offs.
Does anyone have an idea how to work this?
More information about the User
mailing list