tonal-tools 8.3.1 → 8.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tonal/attributions.rb +1 -1
- data/lib/tonal/ratio.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edaeefa4c9e85628de77bdc793e7bf185c66b7f77449201180972798bc8c03e4
|
|
4
|
+
data.tar.gz: c084919a42c7d53a030b208dfcadb3b6b3435a2da23393736ca7aa8a697a0866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 391772bbd5096b18ced768e099f093b5d477a022cd6540a858129abddd5479d00a36e717c81a72af5c5251f71ff5de8ebe7bd6265e168993c58e00f44038562c
|
|
7
|
+
data.tar.gz: 1d90f075280b353130e0df41f21b8993b614fa82c22dd9513ba135641895b86efc570face1f389427837ee5bfb6ffcbfa0619bcfe819b731b59a6f66e1e3f67b
|
data/lib/tonal/attributions.rb
CHANGED
data/lib/tonal/ratio.rb
CHANGED
|
@@ -560,7 +560,8 @@ class Tonal::Ratio
|
|
|
560
560
|
def inspect
|
|
561
561
|
# Return the "antecedent/consequent", if antecedent is less than 7 digits long; or
|
|
562
562
|
# Return the floating point representation rounded to PRECISION digits
|
|
563
|
-
|
|
563
|
+
func = -> (n) { n.zero? ? n : Math.log10(n).to_i + 1 }
|
|
564
|
+
((func.call(antecedent)) <= 6 ? "#{antecedent}/#{consequent}" : "#{to_f.round(PRECISION)}")
|
|
564
565
|
end
|
|
565
566
|
alias :to_s :inspect
|
|
566
567
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tonal-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.3.
|
|
4
|
+
version: 8.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jose Hales-Garcia
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-02-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: yaml
|