Skip to content

Commit b992708

Browse files
authored
Add Kilo prefix to yards (#1339)
Add a "kilo" prefix to yards (similar to kilofeet). 1kyd = 1000yd. See the bottom paragraph of [this Wikipedia article](https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Hybrid_units) for an example of where this is practically used.
1 parent 67e16c6 commit b992708

File tree

13 files changed

+203
-64
lines changed

13 files changed

+203
-64
lines changed

Common/UnitDefinitions/Length.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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": [

Common/UnitEnumValues.g.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,8 @@
701701
"Kilofoot": 45,
702702
"Femtometer": 48,
703703
"Picometer": 43,
704-
"Gigameter": 44
704+
"Gigameter": 44,
705+
"Kiloyard": 38
705706
},
706707
"Level": {
707708
"Decibel": 1,

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

Lines changed: 13 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/LengthUnit.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/NumberToLengthExtensionsTest.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/NumberToLengthExtensions.g.cs

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

UnitsNet.Tests/CustomCode/LengthTests.cs

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

6868
protected override double KiloparsecsInOneMeter => 3.2407790389471100000000000E-20;
6969

70+
protected override double KiloyardsInOneMeter => 1.0936132983E-3;
71+
7072
protected override double LightYearsInOneMeter => 1.0570008340247000000000000E-16;
7173

7274
protected override double MegalightYearsInOneMeter => 1.0570008340247000000000000E-22;

0 commit comments

Comments
 (0)