Method: RQRCodeCore::QRUtil.get_bch_digit

Defined in:
lib/rqrcode_core/qrcode/qr_util.rb

.get_bch_digit(data) ⇒ Object



89
90
91
92
93
94
95
96
97
98
# File 'lib/rqrcode_core/qrcode/qr_util.rb', line 89

def self.get_bch_digit(data)
  digit = 0

  while data != 0
    digit += 1
    data = QRUtil.rszf(data, 1)
  end

  digit
end