anyone have a good routine to round a number to the nearest defined tick value?
I wrote one to round to every 25 or 50 but it doesn't work for others values.
Would like a function like
round(value, n) where n= the minimum tick
so if n=25 & value =2.78
the result would be 2.75
(takes half the tick value and round down if below mid point above if above midpoint)
anyone done anything this elaborate?
thx
I wrote one to round to every 25 or 50 but it doesn't work for others values.
Would like a function like
round(value, n) where n= the minimum tick
so if n=25 & value =2.78
the result would be 2.75
(takes half the tick value and round down if below mid point above if above midpoint)
anyone done anything this elaborate?
thx
Comment