Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: need code for a number rounding engine |
From: | Damien Morton |
Date: | Sat, 9 Sep 2000 12:13:26 +0100 |
round to nearest number is 'int(x+0.5)'
round to nearest 10s is (int((x/10) + 0.5)*10)
round to nearest 100s is (int((x/100) + 0.5)*100)
etc etc
flash 4 has an int(x) function, which should be all you need to build the
other functions from
> -----Original Message-----
> From: Scott Burkette [sburkettelessonlink [dot] com (mailto:sburkettelessonlink [dot] com)]
> Sent: Friday, September 08, 2000 7:57 PM
> To: flasherchinwag [dot] com
> Subject: FLASH: need code for a number rounding engine
>
>
> Hola compadres,
>
> A colleague of mine is faced with the interesting challenge of
> rounding numbers. We are still developing in Flash 4, so the round
> and floor functions of the math object are unavailable. Sounds ok so
> far, but he has got to round any size number to any place. For
> example, the number 1234 rounded to ones, to tens, to hundreds, and
> to thousands. In the future he will be asked to include numbers with
> decimals.
>
> If you are looking for an AS challenge or have done this before any
> help would be appreciated.
>
> TIA
>
> Scott Burkette
> lessonlink.com
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NudeGuru.com is proud to sponsor the Flasher list
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> IT'S THE ART OF MONEY, HONEY!
> Tips and Advice from some of the most popular Flash
> artists + industry power-brokers on how to hold onto
> your rights, negotiate contracts and get full value
> for your work.http://www.nudeguru.com from Franke James
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpchinwag [dot] com
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]