Hey cool. You're the man!
The "n & -n" is interesting, in that it shows what the lowest bit is. It's the conversion from the bit being set to the `number of the bit` which is the hard part. I couldn't figure out any better way to do it so this should be good enough, and much quicker than a loop that searches for bits.
The form:
is good enough for me.
Thanks.
The "n & -n" is interesting, in that it shows what the lowest bit is. It's the conversion from the bit being set to the `number of the bit` which is the hard part. I couldn't figure out any better way to do it so this should be good enough, and much quicker than a loop that searches for bits.
The form:
Local Found:Int=BitToNumber[(Mask & -Mask) * $77cb531 Shr 27]
is good enough for me.
Thanks.