Would that optimize it? I could be wrong but I thing both these version's would compile to the same byte code.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: 29 March 2007 01:52 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Image resizer that maintains ratio mc._width = maxW; mc._height = maxH; (mc._xscale > mc._yscale) ? mc._xscale = mc._yscale : mc._yscale = mc._xscale; > You could probably optimize a little bit by removing the Math > function... > > mc._width = maxW; > mc._height = maxH; > if ( mc._xscale > mc._yscale ) { > mc._xscale = mc._yscale; > } > else { > mc._yscale = mc._xscale; > } > > I don't think I can be done more effiently than that. Anyone? _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com