PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Rotation/Scaling Fixed Point Math?

I was just wondering if the rotation/scaling functions in GapiDraw use fixed point math. If they do, is there a built in fixed point math class hidden somewhere I could use? Im writing a program that does a sort of perspective scaling like "Mode 7" on the Nintendo, and I'm trying to make it as fast as possible.


-Dylan
Here is a little contribution. This is my FixedPoint class which I currently use.

Most operators have been tried by hand, and the class works very well. The precision is indeed limited as it uses 16.16.

If anyone uses this, the only thing I ask is that I any optimization, fixed or changes are sent back to me (pretty please ;)

http://www.techlogic.ca/aw/fixed.zip

The zip file was tested and works correctly.

Let me know how it works.

--Eric
efortier@techlogic.ca