Posts Tagged LUT

Make Math.sqrt Twice As Fast

Tags: , ,

Today’s article shows you how to double the speed of Math.sqrt, which should be useful to many Flash apps as it is a very common operation. For example, the difference between two points involves a square root: sqrt(dx*dx+dy*dy). Read on to learn how!

Read the rest of this article »

20 Comments

Faster Math.sin and Math.cos Through Lookup Tables

Tags: , , , ,

Trigonometry functions like Math.sin and Math.cos are widely used in AS3 games and other apps that make intensive use of graphics, sound, or physics. Today’s article shows you a way to trade a little bit of memory for much faster trigonometry computations, which can seriously speed up any app that makes heavy use of Math.sin, Math.cos, and the like. Keep reading for the class that’ll help you do this, a demo app, performance testing, analysis, and more. (UPDATE: optimized thanks to skyboy)

Read the rest of this article »

16 Comments