tonal-tools 7.1.1 → 7.2.0
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/extensions.rb +8 -0
- 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: 66436f5d5a6721d27fcd887821322ae6dbf21b5179c535a403c23bce0d54bec8
|
|
4
|
+
data.tar.gz: ed4aaf22dc7ed3cbeb255a7f92476c473caf1c130f09b597a1730e56456cd1f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d04097a1ea6067dde1de81b9b4965034c4c001b7b610b45936fd376d900768f0d31aaf5e8649f992e741116e1cc48948db3b9f4020a504ad12ab7bef964accb3
|
|
7
|
+
data.tar.gz: 39b3bb84eb847f9acd210170a7227be740a26bad23baaacc5d10b4ab0a1e2cf6036a31425dc4c17fb85e1317bca88ceb6d27f984806b5e61fae090936a66f4b2
|
data/lib/tonal/attributions.rb
CHANGED
data/lib/tonal/extensions.rb
CHANGED
|
@@ -258,6 +258,14 @@ class Integer
|
|
|
258
258
|
end
|
|
259
259
|
end
|
|
260
260
|
|
|
261
|
+
# @return [Rational] the superparticular ratio based on the given integer as the numerator
|
|
262
|
+
# @example
|
|
263
|
+
# 4.superparticular => 4/3
|
|
264
|
+
def superparticular
|
|
265
|
+
return nil if self < 2
|
|
266
|
+
Rational(self, self-1)
|
|
267
|
+
end
|
|
268
|
+
|
|
261
269
|
# @return [Integer] the count of coprimes less than self
|
|
262
270
|
# @example
|
|
263
271
|
# 10.phi => 4
|
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: 7.
|
|
4
|
+
version: 7.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jose Hales-Garcia
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-10-29 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: yaml
|