Skip to content

Commit

Permalink
docs(frequency): 📖 improve TemperatureFrequency methods documentati…
Browse files Browse the repository at this point in the history
…on and references
  • Loading branch information
albertms10 committed Mar 27, 2024
1 parent 1e3dc6a commit e94f321
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/src/note/frequency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ extension FrequencyIterableExtension on Iterable<Frequency> {

/// A Frequency extension based on temperature.
extension TemperatureFrequency on Frequency {
// Speed of sound at [Celsius.zero] in m/s.
/// Speed of sound at [Celsius.zero] in m/s.
static const _baseSpeedOfSound = 331.3;

/// See [Speed of sound](https://en.wikipedia.org/wiki/Speed_of_sound#Tables).
/// The speed of sound in m/s based on [temperature].
///
/// See [Speed of sound in ideal gases and air](https://en.wikipedia.org/wiki/Speed_of_sound#Speed_of_sound_in_ideal_gases_and_air).
static num speedOfSoundAt(Celsius temperature) =>
_baseSpeedOfSound + 0.6 * temperature;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scale/scale_degree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class ScaleDegree implements Comparable<ScaleDegree> {
semitonesDelta: semitonesDelta ?? this.semitonesDelta,
);

/// Returns the roman numeral of this [ScaleDegree] based on [ordinal].
/// The roman numeral of this [ScaleDegree] based on [ordinal].
///
/// Example:
/// ```dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/scale/scale_pattern.dart
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ final class ScalePattern {
return Scale(degrees, descendingDegrees).pattern;
}

/// Returns the binary representation of this [ScalePattern].
/// The binary representation of this [ScalePattern].
///
/// This method and [ScalePattern.fromBinary] are inverses of each other.
///
Expand Down

0 comments on commit e94f321

Please sign in to comment.