vIntNum static method

int vIntNum(
  1. int byte
)

Implementation

static int vIntNum(int byte) {
  var x = byte;
  var k = 0;
  if ((x >> (k ^ 32)) > 0) k = k ^ 32;
  if ((x >> (k ^ 16)) > 0) k = k ^ 16;
  if ((x >> (k ^ 8)) > 0) k = k ^ 8;
  if ((x >> (k ^ 4)) > 0) k = k ^ 4;
  if ((x >> (k ^ 2)) > 0) k = k ^ 2;
  if ((x >> (k ^ 1)) > 0) k = k ^ 1;
  x = x ^ (1 << k);
  return x;
}