numberOfLeadingZeros method

  1. @override
int numberOfLeadingZeros()

Returns the number of leading zeros in this Int64 as an int between 0 and 64.

Implementation

@override
int numberOfLeadingZeros() {
  int b2 = u.numberOfLeadingZeros(_h);
  if (b2 == 32) {
    int b1 = u.numberOfLeadingZeros(_m);
    if (b1 == 32) {
      return u.numberOfLeadingZeros(_l) + 32;
    } else {
      return b1 + _BITS2 - (32 - _BITS);
    }
  } else {
    return b2 - (32 - _BITS2);
  }
}