unit_measurements 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/lib/unit_measurements/unit_groups/all.rb +2 -0
- data/lib/unit_measurements/unit_groups/plane_angle.rb +18 -0
- data/lib/unit_measurements/unit_groups/sound_level.rb +9 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +25 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1e54b9e8726c0a2fd3740f367a5ad4194f8f5f0d3026dfea34b4a2c22805520
|
4
|
+
data.tar.gz: 4d4232bac494619070f54e4062009bf8426f058e3900a7c9f3a1dddb0e191071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 126901d82bfd00b119e847a32206c0bc0bc51f2c277c1ee2da721e3c142785d67d18e43c88062ace020d08f5da80d31d6e4c5289e48b6a7eded1692b00d52878
|
7
|
+
data.tar.gz: '09472081f85dbe8a3bbd8d8380ca700cf0e39a63ff167ddab00fd0b2e7368e596d3051c94e5cde27c019930ca1f4cb2a224e793fe80f24ddf7770da560074b94'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [2.5.0](https://github.com/shivam091/unit_measurements/compare/v2.4.0...v2.5.0) - 2023-08-23
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added unit group for `sound level` units.
|
6
|
+
- Added unit group for `plane angle` units.
|
7
|
+
|
8
|
+
----------
|
9
|
+
|
1
10
|
## [2.4.0](https://github.com/shivam091/unit_measurements/compare/v2.3.0...v2.4.0) - 2023-08-23
|
2
11
|
|
3
12
|
### What's new
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::PlaneAngle = UnitMeasurements.build do
|
6
|
+
si_unit :rad, aliases: [:radian, :radians]
|
7
|
+
|
8
|
+
unit :deg, value: [(Math::PI / 180), :rad], aliases: [:°, :degree, :degrees] # (π / 180) rad
|
9
|
+
unit :gon, value: [(Math::PI / 200), :rad], aliases: [:ᵍ, :grad, :gradian, :gradians] # (π / 200) rad
|
10
|
+
unit :cir, value: "360 deg", aliases: [:circle, :circles] # (2 * π) rad
|
11
|
+
unit :mil, value: "1/6400 cir", aliases: [:mils] # ((2 * π) / 6400) rad
|
12
|
+
unit :rev, value: "1 cir", aliases: [:revolution, :revolutions] # (2 * π) rad
|
13
|
+
|
14
|
+
unit :brad, value: [(Math::PI / 128), :rad], aliases: [:b°, :bdeg, :"binary degree", :"binary radian", :"binary degrees", :"binary radians"] # (π / 128) rad
|
15
|
+
|
16
|
+
unit :arcmin, value: "1/60 deg", aliases: [:′, :amin, :arcminute, :arcminutes] # ((π / 180) / 60) rad
|
17
|
+
unit :arcsec, value: "1/60 arcmin", aliases: [:″, :asec, :arcsecond, :arcseconds] # ((π / 180) / 3600) rad
|
18
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::SoundLevel = UnitMeasurements.build do
|
6
|
+
si_unit :B, aliases: [:bel, :bels]
|
7
|
+
|
8
|
+
unit :Np, value: [(20 / Math.log(10)), :dB], aliases: [:neper, :nepers] # (20 / ln(10)) dB
|
9
|
+
end
|
data/units.md
CHANGED
@@ -140,3 +140,28 @@ These units are defined in `UnitMeasurements::Quantity`.
|
|
140
140
|
| 3 | gr | gross, grosses |
|
141
141
|
| 4 | dz | doz, dozen, dozens |
|
142
142
|
| 5 | gg | great gross, great grosses, grand gross, grand grosses, dozen gross, dozen grosses |
|
143
|
+
|
144
|
+
## 12. Sound level
|
145
|
+
|
146
|
+
These units are defined in `UnitMeasurements::SoundLevel`.
|
147
|
+
|
148
|
+
| # | Name | Aliases |
|
149
|
+
|:--|:--|:--|
|
150
|
+
| **1** | **B\*** | **bel, bels** |
|
151
|
+
| 2 | Np | neper, nepers |
|
152
|
+
|
153
|
+
## 13. Plane angle
|
154
|
+
|
155
|
+
These units are defined in `UnitMeasurements::PlaneAngle`.
|
156
|
+
|
157
|
+
| # | Name | Aliases |
|
158
|
+
|:--|:--|:--|
|
159
|
+
| **1** | **rad\*** | **radian, radians** |
|
160
|
+
| 2 | deg | °, degree, degrees |
|
161
|
+
| 3 | gon | ᵍ, grad, gradian, gradians |
|
162
|
+
| 4 | cir | circle, circles |
|
163
|
+
| 5 | mil | mils |
|
164
|
+
| 6 | rev | revolution, revolutions |
|
165
|
+
| 7 | brad | b°, bdeg, binary degree, binary radian, binary degrees, binary radians |
|
166
|
+
| 8 | arcmin | ′, amin, arcminute, arcminutes |
|
167
|
+
| 9 | arcsec | ″, asec, arcsecond, arcseconds |
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unit_measurements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harshal LADHE
|
@@ -125,7 +125,9 @@ files:
|
|
125
125
|
- lib/unit_measurements/unit_groups/electric_current.rb
|
126
126
|
- lib/unit_measurements/unit_groups/length.rb
|
127
127
|
- lib/unit_measurements/unit_groups/luminous_intensity.rb
|
128
|
+
- lib/unit_measurements/unit_groups/plane_angle.rb
|
128
129
|
- lib/unit_measurements/unit_groups/quantity.rb
|
130
|
+
- lib/unit_measurements/unit_groups/sound_level.rb
|
129
131
|
- lib/unit_measurements/unit_groups/temperature.rb
|
130
132
|
- lib/unit_measurements/unit_groups/time.rb
|
131
133
|
- lib/unit_measurements/unit_groups/volume.rb
|