Skip to content

Commit fb828d1

Browse files
committed
Merge remote-tracking branch 'origin/master' into release/v6
# Conflicts: # UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs # UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
2 parents ab2618e + 70a6a2b commit fb828d1

File tree

485 files changed

+13273
-1392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+13273
-1392
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Pending author response
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
jobs:
7+
issue_commented:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: siegerts/pending-author-response@v1
11+
with:
12+
github-token: ${{ secrets.GITHUB_TOKEN }}
13+
pending-response-label: pending-response

CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public string Generate()
2525
<package xmlns=""http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"">
2626
<metadata>
2727
<id>UnitsNet.nanoFramework.{_quantity.Name}</id>
28-
<version>5.25.0</version>
28+
<version>5.42.0</version>
2929
<title>Units.NET {_quantity.Name} - nanoFramework</title>
30-
<authors>Andreas Gullberg Larsen,nanoFramework project contributors</authors>
30+
<authors>Andreas Gullberg Larsen,nanoframework</authors>
3131
<owners>UnitsNet</owners>
3232
<license type=""expression"">MIT</license>
3333
<projectUrl>https://github.com/angularsen/UnitsNet</projectUrl>

Common/UnitDefinitions/AmountOfSubstance.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"BaseUnits": {
1515
"N": "Mole"
1616
},
17-
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega"],
17+
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega"],
1818
"Localization": [
1919
{
2020
"Culture": "en-US",

Common/UnitDefinitions/CoefficientOfThermalExpansion.json

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "CoefficientOfThermalExpansion",
3-
"BaseUnit": "InverseKelvin",
3+
"BaseUnit": "PerKelvin",
44
"XmlDocSummary": "A unit that represents a fractional change in size in response to a change in temperature.",
55
"BaseDimensions": {
66
"Θ": -1
@@ -9,6 +9,7 @@
99
{
1010
"SingularName": "InverseKelvin",
1111
"PluralName": "InverseKelvin",
12+
"ObsoleteText": "Use PerKelvin instead.",
1213
"BaseUnits": {
1314
"Θ": "Kelvin"
1415
},
@@ -17,13 +18,14 @@
1718
"Localization": [
1819
{
1920
"Culture": "en-US",
20-
"Abbreviations": [ "K⁻¹", "1/K" ]
21+
"Abbreviations": [ "1/K" ]
2122
}
2223
]
2324
},
2425
{
2526
"SingularName": "InverseDegreeCelsius",
2627
"PluralName": "InverseDegreeCelsius",
28+
"ObsoleteText": "Use PerDegreeCelsius instead.",
2729
"BaseUnits": {
2830
"Θ": "DegreeCelsius"
2931
},
@@ -32,13 +34,14 @@
3234
"Localization": [
3335
{
3436
"Culture": "en-US",
35-
"Abbreviations": [ "°C⁻¹", "1/°C" ]
37+
"Abbreviations": [ "1/°C" ]
3638
}
3739
]
3840
},
3941
{
4042
"SingularName": "InverseDegreeFahrenheit",
4143
"PluralName": "InverseDegreeFahrenheit",
44+
"ObsoleteText": "Use PerDegreeFahrenheit instead.",
4245
"BaseUnits": {
4346
"Θ": "DegreeFahrenheit"
4447
},
@@ -47,7 +50,97 @@
4750
"Localization": [
4851
{
4952
"Culture": "en-US",
50-
"Abbreviations": [ "°F⁻¹", "1/°F" ]
53+
"Abbreviations": [ "1/°F" ]
54+
}
55+
]
56+
},
57+
{
58+
"SingularName": "PerKelvin",
59+
"PluralName": "PerKelvin",
60+
"BaseUnits": {
61+
"Θ": "Kelvin"
62+
},
63+
"FromUnitToBaseFunc": "{x}",
64+
"FromBaseToUnitFunc": "{x}",
65+
"Localization": [
66+
{
67+
"Culture": "en-US",
68+
"Abbreviations": [ "K⁻¹" ]
69+
}
70+
]
71+
},
72+
{
73+
"SingularName": "PerDegreeCelsius",
74+
"PluralName": "PerDegreeCelsius",
75+
"BaseUnits": {
76+
"Θ": "DegreeCelsius"
77+
},
78+
"FromUnitToBaseFunc": "{x}",
79+
"FromBaseToUnitFunc": "{x}",
80+
"Localization": [
81+
{
82+
"Culture": "en-US",
83+
"Abbreviations": [ "°C⁻¹" ]
84+
}
85+
]
86+
},
87+
{
88+
"SingularName": "PerDegreeFahrenheit",
89+
"PluralName": "PerDegreeFahrenheit",
90+
"BaseUnits": {
91+
"Θ": "DegreeFahrenheit"
92+
},
93+
"FromUnitToBaseFunc": "{x} * 9 / 5",
94+
"FromBaseToUnitFunc": "{x} * 5 / 9",
95+
"Localization": [
96+
{
97+
"Culture": "en-US",
98+
"Abbreviations": [ "°F⁻¹" ]
99+
}
100+
]
101+
},
102+
{
103+
"SingularName": "PpmPerKelvin",
104+
"PluralName": "PpmPerKelvin",
105+
"BaseUnits": {
106+
"Θ": "Kelvin"
107+
},
108+
"FromUnitToBaseFunc": "{x} / 1e6",
109+
"FromBaseToUnitFunc": "{x} * 1e6",
110+
"Localization": [
111+
{
112+
"Culture": "en-US",
113+
"Abbreviations": [ "ppm/K" ]
114+
}
115+
]
116+
},
117+
{
118+
"SingularName": "PpmPerDegreeCelsius",
119+
"PluralName": "PpmPerDegreeCelsius",
120+
"BaseUnits": {
121+
"Θ": "DegreeCelsius"
122+
},
123+
"FromUnitToBaseFunc": "{x} / 1e6",
124+
"FromBaseToUnitFunc": "{x} * 1e6",
125+
"Localization": [
126+
{
127+
"Culture": "en-US",
128+
"Abbreviations": [ "ppm/°C" ]
129+
}
130+
]
131+
},
132+
{
133+
"SingularName": "PpmPerDegreeFahrenheit",
134+
"PluralName": "PpmPerDegreeFahrenheit",
135+
"BaseUnits": {
136+
"Θ": "DegreeFahrenheit"
137+
},
138+
"FromUnitToBaseFunc": "{x} * 9 / 5e6",
139+
"FromBaseToUnitFunc": "{x} * 5e6 / 9",
140+
"Localization": [
141+
{
142+
"Culture": "en-US",
143+
"Abbreviations": [ "ppm/°F" ]
51144
}
52145
]
53146
}

Common/UnitDefinitions/Density.json

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,25 @@
9999
}
100100
]
101101
},
102+
{
103+
"SingularName": "PoundPerCubicYard",
104+
"PluralName": "PoundsPerCubicYard",
105+
"XmlDocSummary": "Calculated from the definition of <a href=\"https://en.wikipedia.org/wiki/Pound_(mass)\">pound</a> and <a href=\"https://en.wikipedia.org/wiki/Yard\">yard</a> compared to metric kilogram and meter.",
106+
"BaseUnits": {
107+
"L": "Yard",
108+
"M": "Pound"
109+
},
110+
"FromUnitToBaseFunc": "{x} * (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
111+
"FromBaseToUnitFunc": "{x} / (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
112+
"Prefixes": [ "Kilo" ],
113+
"Localization": [
114+
{
115+
"Culture": "en-US",
116+
"Abbreviations": [ "lb/yd³" ],
117+
"AbbreviationsForPrefixes": { "Kilo": "kip/yd³" }
118+
}
119+
]
120+
},
102121
{
103122
"SingularName": "TonnePerCubicMillimeter",
104123
"PluralName": "TonnesPerCubicMillimeter",
@@ -168,7 +187,7 @@
168187
"PluralName": "GramsPerLiter",
169188
"FromUnitToBaseFunc": "{x} / 1",
170189
"FromBaseToUnitFunc": "{x} * 1",
171-
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
190+
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
172191
"Localization": [
173192
{
174193
"Culture": "en-US",
@@ -181,7 +200,7 @@
181200
"PluralName": "GramsPerDeciliter",
182201
"FromUnitToBaseFunc": "{x} / 1e-1",
183202
"FromBaseToUnitFunc": "{x} * 1e-1",
184-
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
203+
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
185204
"Localization": [
186205
{
187206
"Culture": "en-US",
@@ -194,7 +213,7 @@
194213
"PluralName": "GramsPerMilliliter",
195214
"FromUnitToBaseFunc": "{x} / 1e-3",
196215
"FromBaseToUnitFunc": "{x} * 1e-3",
197-
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
216+
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
198217
"Localization": [
199218
{
200219
"Culture": "en-US",

Common/UnitDefinitions/Energy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"FromUnitToBaseFunc": "{x}",
2020
"FromBaseToUnitFunc": "{x}",
21-
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga", "Tera", "Peta" ],
21+
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera", "Peta" ],
2222
"Localization": [
2323
{
2424
"Culture": "en-US",

Common/UnitDefinitions/Force.json

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
},
1919
"FromUnitToBaseFunc": "{x} / 1e5",
2020
"FromBaseToUnitFunc": "{x} * 1e5",
21+
"XmlDocSummary": "One dyne is equal to 10 micronewtons, 10e−5 N or to 10 nsn (nanosthenes) in the old metre–tonne–second system of units.",
22+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Dyne#Definition",
2123
"Localization": [
2224
{
2325
"Culture": "en-US",
@@ -32,8 +34,10 @@
3234
{
3335
"SingularName": "KilogramForce",
3436
"PluralName": "KilogramsForce",
35-
"FromUnitToBaseFunc": "{x} * 9.80665002864",
36-
"FromBaseToUnitFunc": "{x} / 9.80665002864",
37+
"FromUnitToBaseFunc": "{x} * 9.80665",
38+
"FromBaseToUnitFunc": "{x} / 9.80665",
39+
"XmlDocSummary": "The kilogram-force, or kilopond, is equal to the magnitude of the force exerted on one kilogram of mass in a 9.80665 m/s2 gravitational field (standard gravity). Therefore, one kilogram-force is by definition equal to 9.80665 N.",
40+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Kilogram-force",
3741
"Localization": [
3842
{
3943
"Culture": "en-US",
@@ -48,8 +52,10 @@
4852
{
4953
"SingularName": "TonneForce",
5054
"PluralName": "TonnesForce",
51-
"FromUnitToBaseFunc": "{x} * 9.80665002864e3",
52-
"FromBaseToUnitFunc": "{x} / 9.80665002864e3",
55+
"FromUnitToBaseFunc": "{x} * (9.80665 * 1000)",
56+
"FromBaseToUnitFunc": "{x} / (9.80665 * 1000)",
57+
"XmlDocSummary": "The tonne-force, metric ton-force, megagram-force, and megapond (Mp) are each 1000 kilograms-force.",
58+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Kilogram-force#Related_units",
5359
"Localization": [
5460
{
5561
"Culture": "en-US",
@@ -71,6 +77,8 @@
7177
},
7278
"FromUnitToBaseFunc": "{x}",
7379
"FromBaseToUnitFunc": "{x}",
80+
"XmlDocSummary": "The newton (symbol: N) is the unit of force in the International System of Units (SI). It is defined as 1 kg⋅m/s2, the force which gives a mass of 1 kilogram an acceleration of 1 metre per second per second.",
81+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Newton_(unit)",
7482
"Prefixes": [ "Micro", "Milli", "Deca", "Kilo", "Mega" ],
7583
"Localization": [
7684
{
@@ -86,8 +94,10 @@
8694
{
8795
"SingularName": "KiloPond",
8896
"PluralName": "KiloPonds",
89-
"FromUnitToBaseFunc": "{x} * 9.80665002864",
90-
"FromBaseToUnitFunc": "{x} / 9.80665002864",
97+
"FromUnitToBaseFunc": "{x} * 9.80665",
98+
"FromBaseToUnitFunc": "{x} / 9.80665",
99+
"XmlDocSummary": "The kilogram-force, or kilopond, is equal to the magnitude of the force exerted on one kilogram of mass in a 9.80665 m/s2 gravitational field (standard gravity). Therefore, one kilogram-force is by definition equal to 9.80665 N.",
100+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Kilogram-force",
91101
"Localization": [
92102
{
93103
"Culture": "en-US",
@@ -107,8 +117,10 @@
107117
"M": "Pound",
108118
"T": "Second"
109119
},
110-
"FromUnitToBaseFunc": "{x} * 0.13825502798973041652092282466083",
111-
"FromBaseToUnitFunc": "{x} / 0.13825502798973041652092282466083",
120+
"FromUnitToBaseFunc": "{x} * 0.138254954376",
121+
"FromBaseToUnitFunc": "{x} / 0.138254954376",
122+
"XmlDocSummary": "The poundal is defined as the force necessary to accelerate 1 pound-mass at 1 foot per second per second. 1 pdl = 0.138254954376 N exactly.",
123+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Poundal",
112124
"Localization": [
113125
{
114126
"Culture": "en-US",
@@ -123,8 +135,10 @@
123135
{
124136
"SingularName": "PoundForce",
125137
"PluralName": "PoundsForce",
126-
"FromUnitToBaseFunc": "{x} * 4.4482216152605095551842641431421",
127-
"FromBaseToUnitFunc": "{x} / 4.4482216152605095551842641431421",
138+
"FromUnitToBaseFunc": "{x} * 4.4482216152605",
139+
"FromBaseToUnitFunc": "{x} / 4.4482216152605",
140+
"XmlDocSummary": "The standard values of acceleration of the standard gravitational field (gn) and the international avoirdupois pound (lb) result in a pound-force equal to 4.4482216152605 N.",
141+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Pound_(force)#Definitions",
128142
"Prefixes": [ "Kilo" ],
129143
"Localization": [
130144
{
@@ -142,8 +156,10 @@
142156
{
143157
"SingularName": "OunceForce",
144158
"PluralName": "OunceForce",
145-
"FromUnitToBaseFunc": "{x} * 2.780138509537812e-1",
146-
"FromBaseToUnitFunc": "{x} / 2.780138509537812e-1",
159+
"FromUnitToBaseFunc": "{x} * (4.4482216152605 / 16)",
160+
"FromBaseToUnitFunc": "{x} / (4.4482216152605 / 16)",
161+
"XmlDocSummary": "An ounce-force is 1⁄16 of a pound-force, or about 0.2780139 newtons.",
162+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Ounce#Ounce-force",
147163
"Localization": [
148164
{
149165
"Culture": "en-US",
@@ -154,8 +170,8 @@
154170
{
155171
"SingularName": "ShortTonForce",
156172
"PluralName": "ShortTonsForce",
157-
"FromUnitToBaseFunc": "{x} * 8.896443230521e3",
158-
"FromBaseToUnitFunc": "{x} / 8.896443230521e3",
173+
"FromUnitToBaseFunc": "{x} * (4.4482216152605 * 2000)",
174+
"FromBaseToUnitFunc": "{x} / (4.4482216152605 * 2000)",
159175
"XmlDocSummary": "The short ton-force is a unit of force equal to 2,000 pounds-force (907.18474 kgf), that is most commonly used in the United States – known there simply as the ton or US ton.",
160176
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Ton-force#Short_ton-force",
161177
"Localization": [

Common/UnitDefinitions/Length.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"FromUnitToBaseFunc": "{x}",
1616
"FromBaseToUnitFunc": "{x}",
17-
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
17+
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega", "Giga" ],
1818
"Localization": [
1919
{
2020
"Culture": "en-US",
@@ -63,6 +63,7 @@
6363
},
6464
"FromUnitToBaseFunc": "{x} * 0.9144",
6565
"FromBaseToUnitFunc": "{x} / 0.9144",
66+
"Prefixes": [ "Kilo" ],
6667
"XmlDocSummary": "The yard (symbol: yd) is an English unit of length in both the British imperial and US customary systems of measurement equalling 3 feet (or 36 inches). Since 1959 the yard has been by international agreement standardized as exactly 0.9144 meter. A distance of 1,760 yards is equal to 1 mile.",
6768
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Yard",
6869
"Localization": [

0 commit comments

Comments
 (0)