setScale method
Implementation
LexoDecimal setScale(int nsig, [bool ceiling = false]) {
if (nsig >= sig) {
return this;
}
if (nsig < 0) {
nsig = 0;
}
final diff = sig - nsig;
var nmag = mag.shiftRight(diff);
if (ceiling) {
nmag = nmag.add(LexoInteger.one(nmag.getSystem()));
}
return LexoDecimal.make(nmag, nsig);
}