Introduce Assertion

refactorgram

if (this.discountRate)
  base = base - (this.discountRate * base);

image/svg+xml

assert(this.discountRate >= 0);
if (this.discountRate)
  base = base - (this.discountRate * base);