tax method

void tax(
  1. double percent
)

Applies a tax percentage to the reactive integer (adds percentage).

Example:

final price = swift(100);
price.tax(10); // price.value is now 110

Implementation

void tax(double percent) {
  value = (value * (1 + percent / 100)).round();
}