Skip to content

Commit

Permalink
refactor(hearing_range): ♻️ rename isAudibleAt method (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 authored May 13, 2024
1 parent 451203c commit df15bd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/note/frequency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension type const Frequency._(num hertz) implements num {
/// Note.a.inOctave(4).frequency().isHumanAudible == true
/// Note.g.inOctave(12).frequency().isHumanAudible == false
/// ```
bool get isHumanAudible => HearingRange.human.isAudible(this);
bool get isHumanAudible => HearingRange.human.isAudibleAt(this);

/// The [ClosestPitch] to this [Frequency] from [tuningSystem] and
/// [temperature].
Expand Down
2 changes: 1 addition & 1 deletion lib/src/note/hearing_range.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class HearingRange {
static const human = HearingRange(min: Frequency(20), max: Frequency(20000));

/// Whether [frequency] is audible in this [HearingRange].
bool isAudible(Frequency frequency) => frequency >= min && frequency <= max;
bool isAudibleAt(Frequency frequency) => frequency >= min && frequency <= max;

@override
String toString() => '${min.format()} ≤ f ≤ ${max.format()}';
Expand Down

0 comments on commit df15bd3

Please sign in to comment.