Wouldn't 44 be the cutoff in that case and anything above (44.444) should go to 
48?

-Joe


--- On Thu, 12/18/08, Jiri Heitlager <[email protected]> wrote:

> From: Jiri Heitlager <[email protected]>
> Subject: Re: [Flashcoders] round number to closet value of 8
> To: "Flash Coders List" <[email protected]>
> Date: Thursday, December 18, 2008, 10:04 AM
> Thnx that seems to work good enough.
> 
> 44.4444 is rounded to 48 and should be 40, but thats fine.
> 
> Thnx again.
> 
> Jiri
> 
> Lehr, Ross (N-SGIS) wrote:
> > I think....
> > 
> > Math.round(Math.round(32.3/8)) * 8
> > 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On
> Behalf Of Jiri
> > Heitlager
> > Sent: Thursday, December 18, 2008 8:55 AM
> > To: Flash Coders List
> > Subject: [Flashcoders] round number to closet value of
> 8
> > 
> > I am trying to figure out the fastest way to get the
> closest multitude of 8 from a random Number
> > and I am really not a math person.
> > 
> > var tN:Number = 32.3
> > //32
> > var tN:Number = 32.00
> > //32
> > var tN:Number = 44.9
> > //48
> > var tN:Number = 44.4
> > //40
> > 
> > Much appreciated if someone could help me out
> > 
> > Jiri
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> >
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> >
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > 
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


      
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to