Re: [Flashcoders] Lookup tables

2006-04-09 Thread Boon Chew
Check out some of the articles in Game Programming Gems vol. 2 has an article that deals with floating point op in general, and specifically on fast cosine/sine using LUT. But the code implementation is in C, so they will not readily lend themselves to a direct port to AS. It pays to

[Flashcoders] Lookup tables

2006-04-08 Thread Andreas Rønning
Anyone know of good online tutorials or treatments on generating and using lookup tables to speed up sin/cos and similar math in AS2? I'm looking for ways to reuse the results of a single calculation across a number of variations of the calculated problem. Yes this is game related :)

Re: [Flashcoders] Lookup tables

2006-04-08 Thread Helen Triolo
If array lookup (mysin[some-calculated-angle]) is faster than whatever Flash uses to find Math.sin(some-calculated-angle) --you could write a loop to test that, since I don't know if it's true-- then the simplest thing would be to write (in a dummy fla) a loop to dump the contents you need (in

Re: [Flashcoders] Lookup tables

2006-04-08 Thread Mark Winterhalder
On 4/9/06, Helen Triolo [EMAIL PROTECTED] wrote: If array lookup (mysin[some-calculated-angle]) is faster than whatever Flash uses to find Math.sin(some-calculated-angle) --you could write a loop to test that, since I don't know if it's true-- then the simplest thing would be to write (in a