evaluate abstract method

ImprovementRate evaluate({
  1. required double before,
  2. required double after,
  3. ShouldBe policy = ShouldBe.decreased,
})

Returns the improvement rate calculated from before and after based on policy.

If the policy is increased, a good trend is considered when the value of before increases more than the value of after. Conversely, when the policy is decreased, a good trend is considered when the value of before is less than the value of after. By default, the policy is set to decreased.

The following formula is used to calculate the improvement rate.

Rate = (after - before) / |before| × 100.0

Implementation

ImprovementRate evaluate({
  required double before,
  required double after,
  ShouldBe policy = ShouldBe.decreased,
});