Skip to content

Commit

Permalink
Add Angstrom unit (#1042)
Browse files Browse the repository at this point in the history
* Add Angstrom unit
  • Loading branch information
JasLieb authored Feb 11, 2022
1 parent 8e1240f commit 4d6083d
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 102 deletions.
14 changes: 14 additions & 0 deletions Common/UnitDefinitions/Length.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,20 @@
"Abbreviations": [ "ch" ]
}
]
},
{
"SingularName": "Angstrom",
"PluralName": "Angstroms",
"FromUnitToBaseFunc": "{x} * 1e-10",
"FromBaseToUnitFunc": "{x} / 1e-10",
"XmlDocSummary": "Angstrom is a metric unit of length equal to 1e-10 meter",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Angstrom",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "Å", "A" ]
}
]
}
]
}
13 changes: 13 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Length.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Units/LengthUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions UnitsNet.Tests/CustomCode/LengthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class LengthTests : LengthTestsBase

protected override double DecametersInOneMeter => 1e-1;

protected override double AngstromsInOneMeter => 1e10;

[ Fact]
public void AreaTimesLengthEqualsVolume()
{
Expand Down
217 changes: 115 additions & 102 deletions UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions UnitsNet/GeneratedCode/Quantities/Length.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions UnitsNet/GeneratedCode/Units/LengthUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d6083d

Please sign in to comment.