• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Round Handler, care to share.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Round Handler, care to share.
  • Next by Date: Re: Selecting entire line in BBedit
  • Previous by thread: Re: Round Handler, care to share.
  • Next by thread: Re: Round Handler, care to share.
  • Index(es):
    • Date
    • Thread