QRPolynomial constructor

QRPolynomial(
  1. List<int> thing,
  2. int shift
)

Implementation

factory QRPolynomial(List<int> thing, int shift) {
  var offset = 0;

  while (offset < thing.length && thing[offset] == 0) {
    offset++;
  }

  final values = Uint8List(thing.length - offset + shift);

  for (var i = 0; i < thing.length - offset; i++) {
    values[i] = thing[i + offset];
  }

  return QRPolynomial._internal(values);
}