Members - Reputation: 122
Posted 08 August 2001 - 03:19 AM
Members - Reputation: 351
Posted 08 August 2001 - 09:00 PM
> must be another solution
I think Jamie''s solution is the quickest on most processors. The only caveat is if you code it in C you are letting the compiler choose how to convert to float to int, and it may substiture it''s own lib call or other inefficient code. If you know the processor well you can often do better if you code it in assembly yourself. For maximum speed look at using inline assembly, though this is very processor/compiler dependent.