bottomBits static method

int bottomBits(
  1. int n,
  2. int bits
)

Returns the bottom bits bits from n.

Implementation

static int bottomBits(int n, int bits) => n & ((pow(2, bits)) - 1 as int);