Complement static method
Implementation
static List<int> Complement(
LexoNumeralSystem sys, List<int> mag, int digits) {
if (digits <= 0) {
throw AssertionError('Expected at least 1 digit');
}
final nmag = List<int>.filled(digits, sys.getBase() - 1);
for (var i = 0; i < mag.length; ++i) {
nmag[i] = sys.getBase() - 1 - mag[i];
}
return nmag;
}