Skip to content

Commit

Permalink
📖 docs(interval_size_extension): improve semitones and isPerfect
Browse files Browse the repository at this point in the history
…comments (#226)
  • Loading branch information
albertms10 committed Jul 22, 2023
1 parent 93fd775 commit bff9018
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/interval/interval_size_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ extension IntervalSizeExtension on int {
final simplifiedAbs = simplified.abs();
final octaveShift = chromaticDivisions * (_sizeAbsShift ~/ 8);

// We exclude perfect octaves (simplified as 8) from the lookup because we
// want to consider them as 0 (as they were modulo 8).
// We exclude perfect octaves (simplified as 8) from the lookup to consider
// them 0 (as if they were modulo 8).
return (_sizeToSemitones[simplifiedAbs == 8 ? 1 : simplifiedAbs]! +
octaveShift) *
sign;
Expand All @@ -74,7 +74,7 @@ extension IntervalSizeExtension on int {
return sizeAbs + sizeAbs ~/ 8;
}

/// Returns `true` if this [Interval.size] conforms a perfect interval.
/// Returns whether this [Interval.size] conforms a perfect interval.
///
/// Example:
/// ```dart
Expand Down

0 comments on commit bff9018

Please sign in to comment.