Re: Round Handler, care to share.
Re: Round Handler, care to share.
- Subject: Re: Round Handler, care to share.
- From: email@hidden
- Date: Wed, 6 Dec 2000 17:10:10 EST
you can use mod:
display dialog ("17.2 : " & RoundBy5(17.2) & "
22.8 : " & RoundBy5(22.8)) as string
to RoundBy5(theNumber)
(theNumber mod 5) returning x
if x is greater than or equal to 5 div 2 then
(theNumber - x + 5) as integer
else
(theNumber - x) as integer
end if
end RoundBy5
In a message dated 12/6/00 14:51:30, email@hidden writes:
>
Does anyone have a vanilla handler that finds the next rounded value of
>
a
>
number, this is to be used in charts.
>
>
i.e. 17.2 rounded would be 20
>
>
22.8 rounded would be 25