operator * method

RollResult operator *(
  1. RollResult other
)

multiplication operator for RollResult.

Results are collapsed into a single value (the result of multiplication).

Implementation

RollResult operator *(RollResult other) {
  return RollResult(
    expression: "($expression*${other.expression})",
    results: [totalOrDefault(() => 0) * other.totalOrDefault(() => 0)],
    left: this,
    right: other,
  );
}