Skip to content

Commit 7afdd82

Browse files
authored
Add micro, nano prefix to Energy unit Joule (#1316)
Hello, For the correct display of the values of our laser energy meters we are currently missing the prefixes micro and nano for the unit joule. It would be nice if this could be added. Many thanks
1 parent a22e333 commit 7afdd82

File tree

11 files changed

+212
-36
lines changed

11 files changed

+212
-36
lines changed

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/UnitEnumValues.g.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@
433433
"WattDay": 35,
434434
"WattHour": 36,
435435
"Petajoule": 43,
436-
"Terajoule": 37
436+
"Terajoule": 37,
437+
"Microjoule": 47,
438+
"Nanojoule": 45
437439
},
438440
"Entropy": {
439441
"CaloriePerKelvin": 1,

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

Lines changed: 26 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/EnergyUnit.g.cs

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

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToEnergyExtensionsTest.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.NumberExtensions/GeneratedCode/NumberToEnergyExtensions.g.cs

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

UnitsNet.Tests/CustomCode/EnergyTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed under MIT No Attribution, see LICENSE file at the root.
1+
// Licensed under MIT No Attribution, see LICENSE file at the root.
22
// Copyright 2013 Andreas Gullberg Larsen ([email protected]). Maintained at https://github.com/angularsen/UnitsNet.
33

44
using System;
@@ -42,6 +42,10 @@ public class EnergyTests : EnergyTestsBase
4242

4343
protected override double MillijoulesInOneJoule => 1000;
4444

45+
protected override double MicrojoulesInOneJoule => 1E6;
46+
47+
protected override double NanojoulesInOneJoule => 1E9;
48+
4549
protected override double TerawattHoursInOneJoule => 2.77777778e-16;
4650

4751
protected override double TerawattDaysInOneJoule => 1.157407407407410E-17;

0 commit comments

Comments
 (0)