View Single Post
Re: Attempting to create float free engine
Old
  (#7)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Attempting to create float free engine - 02-01-2006

My precision ony can go to 1/32768, unfortunately.

Let me try to elaborate, only using 8 bits:

sign bit, 4, 2, 1, 1/2, 1/4, 1/8, 1/16
00011000

I am doing this with 32 bits, though. One thing, after you multiply, you will need to bitshift back, because the answer will be too large. You also need to shift after a divide, or else the answer will be to small. Addition and subtraction can be done normally. Doom uses this method.


sfx1999.postcount++
  
Reply With Quote