Last week’s article showed you a way to improve the performance of trig functions like
Math.sin by almost 4x by using lookup tables. This week’s article will go even further and show you how to increase this speedup to over 10x!
Posts Tagged trigonometry
Trigonometry functions like
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.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)