Skip to content

Commit 484966f

Browse files
authored
Add prefix milli to torr unit (#1588)
Hello, it's me again ! This time, I'm adding prefix milli for Torr unit, although it's not part of the SI, the millitorr is widely used in scientific and industrial vacuum applications. Let me know if you have any feedback !
1 parent 5460367 commit 484966f

12 files changed

Lines changed: 144 additions & 40 deletions

File tree

Common/UnitDefinitions/Pressure.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Torr",
199199
"FromUnitToBaseFunc": "{x} * 101325 / 760",
200200
"FromBaseToUnitFunc": "{x} * 760 / 101325",
201+
"Prefixes": [ "Milli"],
201202
"Localization": [
202203
{
203204
"Culture": "en-US",

Common/UnitEnumValues.g.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,8 @@
11831183
"TonneForcePerSquareMillimeter": 46,
11841184
"Torr": 47,
11851185
"MeterOfWaterColumn": 57,
1186-
"CentimeterOfWaterColumn": 48
1186+
"CentimeterOfWaterColumn": 48,
1187+
"Millitorr": 52
11871188
},
11881189
"PressureChangeRate": {
11891190
"AtmospherePerSecond": 1,

UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureExtensionsTest.g.cs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureExtensions.g.cs

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.Tests/CustomCode/PressureTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public class PressureTests : PressureTestsBase
6767

6868
protected override double TorrsInOnePascal => 7.5006 * 1E-3;
6969

70+
protected override double MillitorrsInOnePascal => 7.5006;
71+
7072
protected override double CentibarsInOnePascal => 1e-3;
7173

7274
protected override double DecapascalsInOnePascal => 1e-1;

0 commit comments

Comments
 (0)