Function getBitmask

Takes two integers and returns a bitmask that covers all values between 1 << start and 1 << end, including the starting and ending one.

If pStart > pEnd, they are reversed.

getBitmask(start, start) always returns 1 << start getBitmask(start, end) always returns same as getBitmask(end, start)