Class: RQRCodeCore::QRMath
- Inherits:
-
Object
- Object
- RQRCodeCore::QRMath
- Defined in:
- lib/rqrcode_core/qrcode/qr_math.rb
Class Method Summary collapse
Class Method Details
.gexp(n) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/rqrcode_core/qrcode/qr_math.rb', line 35 def gexp(n) while n < 0 n = n + 255 end while n >= 256 n = n - 255 end EXP_TABLE[n] end |
.glog(n) ⇒ Object
29 30 31 32 |
# File 'lib/rqrcode_core/qrcode/qr_math.rb', line 29 def glog(n) raise QRCodeRunTimeError, "glog(#{n})" if ( n < 1 ) LOG_TABLE[n] end |