Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(mode): rename compare static method #98

Merged
merged 1 commit into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/src/tonality/mode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class Mode implements Enum, Comparable<Mode> {
int get brightness;

/// [Comparator] for [Mode]s.
static int compareModes(Mode a, Mode b) => compareMultiple([
static int compare(Mode a, Mode b) => compareMultiple([
() => a.brightness.compareTo(b.brightness),
() => a.name.compareTo(b.name),
]);
Expand Down Expand Up @@ -48,7 +48,7 @@ enum TonalMode implements Mode {
this == TonalMode.major ? TonalMode.minor : TonalMode.major;

@override
int compareTo(Mode other) => Mode.compareModes(this, other);
int compareTo(Mode other) => Mode.compare(this, other);
}

enum ModalMode implements Mode {
Expand Down Expand Up @@ -96,5 +96,5 @@ enum ModalMode implements Mode {
values.firstWhere((mode) => mode.brightness == -brightness);

@override
int compareTo(Mode other) => Mode.compareModes(this, other);
int compareTo(Mode other) => Mode.compare(this, other);
}