Monday, June 28, 2010

The Wonders of Fixed Point Math - Or how I got XNA to cull thousnands of objects fast

So what is fixed point math ? Well you could say that it's an old technique to approximate decimal numbers on computers without floating point processors.

So why should we care about it then ?

A good questions there are multiple instances where using a fixed point representation can help you considerably. One is if you are running into the problems of the inconsistencies that are at the core of how we handle floating point math on modern computers. Or if you are simply running on a platform where the floating point performance is way to low and you don't need 6-7 decimals of accuracy.

For me while working professionally it has been along time since I had to use fixed point. But then again there has been plenty of cases it has been under serious discussion to resolve issues with floating point inconsistencies and I know of numerous companies that have used them to battle the problems.