numberOfLeadingZeros method Null safety

  1. @override
int numberOfLeadingZeros()
override

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

Implementation

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