Skip to content

Commit

Permalink
Added Accidentals decremented getters
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Jun 7, 2020
1 parent 4bc313d commit 092a5fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/enums/accidentals.dart
Expand Up @@ -59,6 +59,10 @@ extension AccidentalsValues on Accidentals {

Accidentals get incremented => increment(1);

Accidentals get decremented => decrement(1);

Accidentals increment(int n) =>
fromValue((value.abs() + n) * (value > 0 ? 1 : -1));

Accidentals decrement(int n) => increment(-n);
}

0 comments on commit 092a5fc

Please sign in to comment.