I have the following simple equation in my C # program to convert a number to a resulting value:
sectorSize = 1 << sectorShift;
Is there some kind of reverse operation that will allow me to go the other way?
sectorShift = ???
I know you can implement a loop, but this is a bit overkill. I have never had to do this before, so I have no idea and I can not find anything on the Internet about it. The equation I need is only for reliable results when the Size sector is a power of two; the rest of the domain can go to hell for everything I need.
source share