plectrum

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4c97fa88eb1759e1f475c051a498a9fd757bec40
parent 9edcefc1488054c01b1cc3643054210ef64d89f7
Author: gstraube <gstraube@mailbox.org>
Date:   Sun, 15 Oct 2017 13:18:21 +0200

Increase number of significant digits

Diffstat:
Mapp/src/main/java/com/github/cythara/StandardTuning.java | 10+++++-----
Mapp/src/test/java/com/github/cythara/PitchComparatorTest.java | 8++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/src/main/java/com/github/cythara/StandardTuning.java b/app/src/main/java/com/github/cythara/StandardTuning.java @@ -4,12 +4,12 @@ class StandardTuning implements Tuning { enum Pitch implements com.github.cythara.Note { - E2(82.41f), + E2(82.407f), A2(110f), - D3(146.83f), - G3(196f), - B3(246.94f), - E4(329.63f); + D3(146.832f), + G3(195.998f), + B3(246.942f), + E4(329.628f); private final float frequency; diff --git a/app/src/test/java/com/github/cythara/PitchComparatorTest.java b/app/src/test/java/com/github/cythara/PitchComparatorTest.java @@ -15,10 +15,10 @@ public class PitchComparatorTest { @Test public void retrieveNote() throws Exception { Map<Float, PitchDifference> expectations = new HashMap<>(); - expectations.put(20f, new PitchDifference(E2, -2451.3832933619105)); - expectations.put(500f, new PitchDifference(E4, 721.296654095616)); - expectations.put(197.67f, new PitchDifference(G3, 14.688333908767358)); - expectations.put(128.415f, new PitchDifference(D3, -231.99964198777823)); + expectations.put(20f, new PitchDifference(E2, -2451.3202694972874)); + expectations.put(500f, new PitchDifference(E4, 721.3071582323822)); + expectations.put(197.67f, new PitchDifference(G3, 14.705999652460953)); + expectations.put(128.415f, new PitchDifference(D3, -232.0232233030192)); for (Float pitch : expectations.keySet()) { PitchDifference actual = PitchComparator.retrieveNote(pitch);