Quote:
Originally Posted by JonathanLKS
If you need those decimals, you could just scale them up by a few factors of ten so you can use ints, divide, then scale it back down.
It'll be faster too.
|
Scale up by factors of 2. Then you can use << instead of *. It's a heck of a lot quicker. You still have to divide unless you're using unsigned ints, however.