Attempting to create float free engine -
29-12-2005
Yes, I know it is difficult. I have created a float-implementation independant way of converting floats to 16:16 integers. It is not endian independant, though. Of course it doesn't matter that much, because floats are always stored the same way IIRC except on a VAX or ALPHA or something.
Anyway, I am going to be generating tables for SIN and COS and am planning to use a base two system instead of radians or degrees. How much precision will I need? I am planning to make it 4096 ints long. This way I won't have to perform a modulus operation; I can use bit manipulation instead. Is this enough?
My only other problem is square roots, that will be a pain in the ass.
If you didn't get what I meant by precision, let me elaborate. I plan to make 0 degrees 0 and 360 degrees 4096. 4096 won't exist in the table because it is redundant. Is 4096 enough, or should I go up?
|