Am Donnerstag, den 18.12.2008, 16:13 +0100 schrieb Hans Wichman: 
> Hi,
> I think you are looking for :
> function roundToEight (pVal:Number) {
>  return Math.round(pVal/8)<<3;
> }
> although 44.9 and 44.4 will both return 48, don't you mean 43.9 and 44.4?
> 

int(pVal + 4) &~ 7;

will also do it.

--
Free Flash, use Gnash
http://www.gnu.org/software/gnash/

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de

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

Reply via email to