Skip to content

Commit

Permalink
Update hzToSemitone and doubleToSemitone functions doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Barros committed Jan 31, 2024
1 parent 57fb197 commit da7aff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pitch/Hz.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ hzToDouble (Hz hz) = 12.0 * logBase 2 (hz / unHz pitchStandard)
-- | Use `hzToDouble` to convert Hz to `Semitone`.
--
-- >>> hzToSemitone (Hz 880.0)
-- Semitone {unSemitone = 12.0}
-- 12.0 Semitone(s)
hzToSemitone :: Hz -> Semitone
hzToSemitone = Semitone . hzToDouble

Expand All @@ -53,6 +53,6 @@ semitoneToDouble (Semitone n) = n
-- | Wrap a `Double` as a `Semitone`.
--
-- >>> doubleToSemitone 12.0
-- Semitone {unSemitone = 12.0}
-- 12.0 Semitone(s)
doubleToSemitone :: Double -> Semitone
doubleToSemitone = Semitone

0 comments on commit da7aff8

Please sign in to comment.