public function getBottomRightOnBit() : ?array
    {
        $bitsOffset = count($this->bits) - 1;

        while ($bitsOffset >= 0 && 0 === $this->bits[$bitsOffset]) {
            --$bitsOffset;
        }

        if ($bitsOffset < 0) {
            return null;
        }

        $x = intdiv($bitsOffset, $this->rowSize);
        $y = ($bitsOffset % $this->rowSize) << 5;

        $bits = $this->bits[$bitsOffset];
        $bit  = 0;

        while (0 === BitUtils::unsignedRightShift($bits, $bit)) {
            --$bit;
        }

        $x += $bit;

        return [$x, $y];
    }
public function getBottomRightOnBit() : ?array
    {
        $bitsOffset = count($this->bits) - 1;

        while ($bitsOffset >= 0 && 0 === $this->bits[$bitsOffset]) {
            --$bitsOffset;
        }

        if ($bitsOffset < 0) {
            return null;
        }

        $x = intdiv($bitsOffset, $this->rowSize);
        $y = ($bitsOffset % $this->rowSize) << 5;

        $bits = $this->bits[$bitsOffset];
        $bit  = 0;

        while (0 === BitUtils::unsignedRightShift($bits, $bit)) {
            --$bit;
        }

        $x += $bit;

        return [$x, $y];
    }
public function getBottomRightOnBit ( ) : ? array { $ bitsOffset = count ( $ this -> bits ) - 1 ; while ( $ bitsOffset >= 0 && 0 === $ this -> bits [ $ bitsOffset ] ) { -- $ bitsOffset ; } if ( $ bitsOffset < 0 ) { return null ; } $ x = intdiv ( $ bitsOffset , $ this -> rowSize ) ; $ y = ( $ bitsOffset % $ this -> rowSize ) << 5 ; $ bits = $ this -> bits [ $ bitsOffset ] ; $ bit = 0 ; while ( 0 === BitUtils :: unsignedRightShift ( $ bits , $ bit ) ) { -- $ bit ; } $ x += $ bit ; return [ $ x , $ y ] ; }
Gets the most bottom right set bit.

This is useful in detecting a corner of a 'pure' barcode.

@return int[]|null
Gets the most bottom right set bit .