From 4d7e58e51a30dac29c0ef589a18d142678e93df0 Mon Sep 17 00:00:00 2001 From: Dirk Schuermans Date: Wed, 5 Feb 2020 17:11:14 +0100 Subject: [PATCH 1/3] Added KilopoundForceFeetPerDegreesPerFeet (kips-ft/deg/ft) and PoundForceFeetPerDegreesPerFeet (lbf-ft/deg/ft) imperial variants to RotationalStiffnessPerLength --- .../RotationalStiffnessPerLength.json | 24 +++++++++++ .../RotationalStiffnessPerLengthTests.cs | 2 + .../GeneratedCode/IQuantityTests.g.cs | 2 +- ...RotationalStiffnessPerLengthTestsBase.g.cs | 42 ++++++++++++++++--- .../RotationalStiffnessPerLength.g.cs | 34 +++++++++++++++ .../GeneratedCode/UnitAbbreviationsCache.g.cs | 2 + .../RotationalStiffnessPerLengthUnit.g.cs | 2 + .../RotationalStiffnessPerLength.g.cs | 34 +++++++++++++++ .../GeneratedCode/UnitAbbreviationsCache.g.cs | 2 + UnitsNet/GeneratedCode/UnitConverter.g.cs | 4 ++ .../RotationalStiffnessPerLengthUnit.g.cs | 2 + 11 files changed, 143 insertions(+), 7 deletions(-) diff --git a/Common/UnitDefinitions/RotationalStiffnessPerLength.json b/Common/UnitDefinitions/RotationalStiffnessPerLength.json index 01c8c4dfdb..5cd2fbe39d 100644 --- a/Common/UnitDefinitions/RotationalStiffnessPerLength.json +++ b/Common/UnitDefinitions/RotationalStiffnessPerLength.json @@ -20,6 +20,30 @@ "Abbreviations": [ "N·m/rad/m", "Nm/rad/m" ] } ] + }, + { + "SingularName": "PoundForceFootPerDegreesPerFoot", + "PluralName": "PoundForceFeetPerDegreesPerFeet", + "FromUnitToBaseFunc": "x*254.864324570", + "FromBaseToUnitFunc": "x/254.864324570", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "lbf·ft/deg/ft" ] + } + ] + }, + { + "SingularName": "KilopoundForceFootPerDegreesPerFoot", + "PluralName": "KilopoundForceFeetPerDegreesPerFeet", + "FromUnitToBaseFunc": "x*254864.324570", + "FromBaseToUnitFunc": "x/254864.324570", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "kipf·ft/deg/ft" ] + } + ] } ] } diff --git a/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs b/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs index 56950c811b..674008b663 100644 --- a/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs +++ b/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs @@ -28,7 +28,9 @@ namespace UnitsNet.Tests.CustomCode public class RotationalStiffnessPerLengthTests : RotationalStiffnessPerLengthTestsBase { protected override double KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter => 1E-3; + protected override double KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter => 3.92365625e-6; protected override double MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter => 1E-6; protected override double NewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter => 1; + protected override double PoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter => 3.92365625e-3; } } diff --git a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs index 8951cde1ea..b0becab606 100644 --- a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs +++ b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs @@ -114,7 +114,7 @@ void Assertion(int expectedValue, Enum expectedUnit, IQuantity quantity) Assertion(3, RotationalAccelerationUnit.RevolutionPerSecondSquared, Quantity.From(3, RotationalAccelerationUnit.RevolutionPerSecondSquared)); Assertion(3, RotationalSpeedUnit.RevolutionPerSecond, Quantity.From(3, RotationalSpeedUnit.RevolutionPerSecond)); Assertion(3, RotationalStiffnessUnit.NewtonMeterPerRadian, Quantity.From(3, RotationalStiffnessUnit.NewtonMeterPerRadian)); - Assertion(3, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, Quantity.From(3, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter)); + Assertion(3, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, Quantity.From(3, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot)); Assertion(3, SolidAngleUnit.Steradian, Quantity.From(3, SolidAngleUnit.Steradian)); Assertion(3, SpecificEnergyUnit.WattHourPerKilogram, Quantity.From(3, SpecificEnergyUnit.WattHourPerKilogram)); Assertion(3, SpecificEntropyUnit.MegajoulePerKilogramKelvin, Quantity.From(3, SpecificEntropyUnit.MegajoulePerKilogramKelvin)); diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index d53871c3d3..0ceafd91c2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -37,13 +37,17 @@ namespace UnitsNet.Tests public abstract partial class RotationalStiffnessPerLengthTestsBase { protected abstract double KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter { get; } + protected abstract double KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter { get; } protected abstract double MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter { get; } protected abstract double NewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter { get; } + protected abstract double PoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter { get; } // ReSharper disable VirtualMemberNeverOverriden.Global protected virtual double KilonewtonMetersPerRadianPerMeterTolerance { get { return 1e-5; } } + protected virtual double KilopoundForceFeetPerDegreesPerFeetTolerance { get { return 1e-5; } } protected virtual double MeganewtonMetersPerRadianPerMeterTolerance { get { return 1e-5; } } protected virtual double NewtonMetersPerRadianPerMeterTolerance { get { return 1e-5; } } + protected virtual double PoundForceFeetPerDegreesPerFeetTolerance { get { return 1e-5; } } // ReSharper restore VirtualMemberNeverOverriden.Global [Fact] @@ -106,8 +110,10 @@ public void NewtonMeterPerRadianPerMeterToRotationalStiffnessPerLengthUnits() { RotationalStiffnessPerLength newtonmeterperradianpermeter = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1); AssertEx.EqualTolerance(KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.KilonewtonMetersPerRadianPerMeter, KilonewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.KilopoundForceFeetPerDegreesPerFeet, KilopoundForceFeetPerDegreesPerFeetTolerance); AssertEx.EqualTolerance(MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.MeganewtonMetersPerRadianPerMeter, MeganewtonMetersPerRadianPerMeterTolerance); AssertEx.EqualTolerance(NewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.NewtonMetersPerRadianPerMeter, NewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(PoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.PoundForceFeetPerDegreesPerFeet, PoundForceFeetPerDegreesPerFeetTolerance); } [Fact] @@ -117,13 +123,21 @@ public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() AssertEx.EqualTolerance(1, quantity00.KilonewtonMetersPerRadianPerMeter, KilonewtonMetersPerRadianPerMeterTolerance); Assert.Equal(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, quantity00.Unit); - var quantity01 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter); - AssertEx.EqualTolerance(1, quantity01.MeganewtonMetersPerRadianPerMeter, MeganewtonMetersPerRadianPerMeterTolerance); - Assert.Equal(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, quantity01.Unit); + var quantity01 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + AssertEx.EqualTolerance(1, quantity01.KilopoundForceFeetPerDegreesPerFeet, KilopoundForceFeetPerDegreesPerFeetTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, quantity01.Unit); - var quantity02 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); - AssertEx.EqualTolerance(1, quantity02.NewtonMetersPerRadianPerMeter, NewtonMetersPerRadianPerMeterTolerance); - Assert.Equal(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, quantity02.Unit); + var quantity02 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter); + AssertEx.EqualTolerance(1, quantity02.MeganewtonMetersPerRadianPerMeter, MeganewtonMetersPerRadianPerMeterTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, quantity02.Unit); + + var quantity03 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); + AssertEx.EqualTolerance(1, quantity03.NewtonMetersPerRadianPerMeter, NewtonMetersPerRadianPerMeterTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, quantity03.Unit); + + var quantity04 = RotationalStiffnessPerLength.From(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + AssertEx.EqualTolerance(1, quantity04.PoundForceFeetPerDegreesPerFeet, PoundForceFeetPerDegreesPerFeetTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, quantity04.Unit); } @@ -145,8 +159,10 @@ public void As() { var newtonmeterperradianpermeter = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1); AssertEx.EqualTolerance(KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.As(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter), KilonewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.As(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot), KilopoundForceFeetPerDegreesPerFeetTolerance); AssertEx.EqualTolerance(MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.As(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter), MeganewtonMetersPerRadianPerMeterTolerance); AssertEx.EqualTolerance(NewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.As(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter), NewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(PoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, newtonmeterperradianpermeter.As(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot), PoundForceFeetPerDegreesPerFeetTolerance); } [Fact] @@ -158,6 +174,10 @@ public void ToUnit() AssertEx.EqualTolerance(KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, (double)kilonewtonmeterperradianpermeterQuantity.Value, KilonewtonMetersPerRadianPerMeterTolerance); Assert.Equal(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, kilonewtonmeterperradianpermeterQuantity.Unit); + var kilopoundforcefootperdegreesperfootQuantity = newtonmeterperradianpermeter.ToUnit(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + AssertEx.EqualTolerance(KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, (double)kilopoundforcefootperdegreesperfootQuantity.Value, KilopoundForceFeetPerDegreesPerFeetTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, kilopoundforcefootperdegreesperfootQuantity.Unit); + var meganewtonmeterperradianpermeterQuantity = newtonmeterperradianpermeter.ToUnit(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter); AssertEx.EqualTolerance(MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, (double)meganewtonmeterperradianpermeterQuantity.Value, MeganewtonMetersPerRadianPerMeterTolerance); Assert.Equal(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, meganewtonmeterperradianpermeterQuantity.Unit); @@ -165,6 +185,10 @@ public void ToUnit() var newtonmeterperradianpermeterQuantity = newtonmeterperradianpermeter.ToUnit(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); AssertEx.EqualTolerance(NewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter, (double)newtonmeterperradianpermeterQuantity.Value, NewtonMetersPerRadianPerMeterTolerance); Assert.Equal(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, newtonmeterperradianpermeterQuantity.Unit); + + var poundforcefootperdegreesperfootQuantity = newtonmeterperradianpermeter.ToUnit(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + AssertEx.EqualTolerance(PoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter, (double)poundforcefootperdegreesperfootQuantity.Value, PoundForceFeetPerDegreesPerFeetTolerance); + Assert.Equal(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, poundforcefootperdegreesperfootQuantity.Unit); } [Fact] @@ -172,8 +196,10 @@ public void ConversionRoundTrip() { RotationalStiffnessPerLength newtonmeterperradianpermeter = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1); AssertEx.EqualTolerance(1, RotationalStiffnessPerLength.FromKilonewtonMetersPerRadianPerMeter(newtonmeterperradianpermeter.KilonewtonMetersPerRadianPerMeter).NewtonMetersPerRadianPerMeter, KilonewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(1, RotationalStiffnessPerLength.FromKilopoundForceFeetPerDegreesPerFeet(newtonmeterperradianpermeter.KilopoundForceFeetPerDegreesPerFeet).NewtonMetersPerRadianPerMeter, KilopoundForceFeetPerDegreesPerFeetTolerance); AssertEx.EqualTolerance(1, RotationalStiffnessPerLength.FromMeganewtonMetersPerRadianPerMeter(newtonmeterperradianpermeter.MeganewtonMetersPerRadianPerMeter).NewtonMetersPerRadianPerMeter, MeganewtonMetersPerRadianPerMeterTolerance); AssertEx.EqualTolerance(1, RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(newtonmeterperradianpermeter.NewtonMetersPerRadianPerMeter).NewtonMetersPerRadianPerMeter, NewtonMetersPerRadianPerMeterTolerance); + AssertEx.EqualTolerance(1, RotationalStiffnessPerLength.FromPoundForceFeetPerDegreesPerFeet(newtonmeterperradianpermeter.PoundForceFeetPerDegreesPerFeet).NewtonMetersPerRadianPerMeter, PoundForceFeetPerDegreesPerFeetTolerance); } [Fact] @@ -314,8 +340,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString()); + Assert.Equal("1 kipf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString()); Assert.Equal("1 MN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString()); + Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString()); } finally { @@ -330,8 +358,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString(swedishCulture)); + Assert.Equal("1 kipf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString(swedishCulture)); Assert.Equal("1 MN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter).ToString(swedishCulture)); Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString(swedishCulture)); + Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString(swedishCulture)); } [Fact] diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index cc01137894..ad0759f9a1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -160,6 +160,11 @@ private RotationalStiffnessPerLength(double value, RotationalStiffnessPerLengthU /// public double KilonewtonMetersPerRadianPerMeter => As(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter); + /// + /// Get RotationalStiffnessPerLength in KilopoundForceFeetPerDegreesPerFeet. + /// + public double KilopoundForceFeetPerDegreesPerFeet => As(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + /// /// Get RotationalStiffnessPerLength in MeganewtonMetersPerRadianPerMeter. /// @@ -170,6 +175,11 @@ private RotationalStiffnessPerLength(double value, RotationalStiffnessPerLengthU /// public double NewtonMetersPerRadianPerMeter => As(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); + /// + /// Get RotationalStiffnessPerLength in PoundForceFeetPerDegreesPerFeet. + /// + public double PoundForceFeetPerDegreesPerFeet => As(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + #endregion #region Static Methods @@ -211,6 +221,16 @@ public static RotationalStiffnessPerLength FromKilonewtonMetersPerRadianPerMeter return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter); } /// + /// Get RotationalStiffnessPerLength from KilopoundForceFeetPerDegreesPerFeet. + /// + /// If value is NaN or Infinity. + [Windows.Foundation.Metadata.DefaultOverload] + public static RotationalStiffnessPerLength FromKilopoundForceFeetPerDegreesPerFeet(double kilopoundforcefeetperdegreesperfeet) + { + double value = (double) kilopoundforcefeetperdegreesperfeet; + return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + } + /// /// Get RotationalStiffnessPerLength from MeganewtonMetersPerRadianPerMeter. /// /// If value is NaN or Infinity. @@ -230,6 +250,16 @@ public static RotationalStiffnessPerLength FromNewtonMetersPerRadianPerMeter(dou double value = (double) newtonmetersperradianpermeter; return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); } + /// + /// Get RotationalStiffnessPerLength from PoundForceFeetPerDegreesPerFeet. + /// + /// If value is NaN or Infinity. + [Windows.Foundation.Metadata.DefaultOverload] + public static RotationalStiffnessPerLength FromPoundForceFeetPerDegreesPerFeet(double poundforcefeetperdegreesperfeet) + { + double value = (double) poundforcefeetperdegreesperfeet; + return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + } /// /// Dynamically convert from value and unit enum to . @@ -522,8 +552,10 @@ private double AsBaseUnit() switch(Unit) { case RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter: return (_value) * 1e3d; + case RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot: return _value*254864.324570; case RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter: return (_value) * 1e6d; case RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter: return _value; + case RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot: return _value*254.864324570; default: throw new NotImplementedException($"Can not convert {Unit} to base units."); } @@ -539,8 +571,10 @@ private double AsBaseNumericType(RotationalStiffnessPerLengthUnit unit) switch(unit) { case RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter: return (baseUnitValue) / 1e3d; + case RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot: return baseUnitValue/254864.324570; case RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter: return (baseUnitValue) / 1e6d; case RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter: return baseUnitValue; + case RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot: return baseUnitValue/254.864324570; default: throw new NotImplementedException($"Can not convert {Unit} to {unit}."); } diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs index c69a6aad28..c3e70f956e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs @@ -1000,8 +1000,10 @@ private static readonly (string CultureName, Type UnitType, int UnitValue, strin ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.MeganewtonMeterPerRadian, new string[]{"MN·m/rad", "MNm/rad"}), ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.NewtonMeterPerRadian, new string[]{"N·m/rad", "Nm/rad"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new string[]{"kN·m/rad/m", "kNm/rad/m"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/deg/ft"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new string[]{"MN·m/rad/m", "MNm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new string[]{"N·m/rad/m", "Nm/rad/m"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new string[]{"lbf·ft/deg/ft"}), ("en-US", typeof(SolidAngleUnit), (int)SolidAngleUnit.Steradian, new string[]{"sr"}), ("en-US", typeof(SpecificEnergyUnit), (int)SpecificEnergyUnit.BtuPerPound, new string[]{"btu/lb"}), ("en-US", typeof(SpecificEnergyUnit), (int)SpecificEnergyUnit.CaloriePerGram, new string[]{"cal/g"}), diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs index bb0630f745..5b66a52515 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs @@ -27,8 +27,10 @@ public enum RotationalStiffnessPerLengthUnit { Undefined = 0, KilonewtonMeterPerRadianPerMeter, + KilopoundForceFootPerDegreesPerFoot, MeganewtonMeterPerRadianPerMeter, NewtonMeterPerRadianPerMeter, + PoundForceFootPerDegreesPerFoot, } #pragma warning restore 1591 diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 9d7509b9f1..003aa62c6e 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -51,8 +51,10 @@ static RotationalStiffnessPerLength() Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, new UnitInfo[] { new UnitInfo(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, BaseUnits.Undefined), new UnitInfo(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, BaseUnits.Undefined), new UnitInfo(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, BaseUnits.Undefined), }, BaseUnit, Zero, BaseDimensions); } @@ -170,6 +172,11 @@ public RotationalStiffnessPerLength(double value, UnitSystem unitSystem) /// public double KilonewtonMetersPerRadianPerMeter => As(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter); + /// + /// Get RotationalStiffnessPerLength in KilopoundForceFeetPerDegreesPerFeet. + /// + public double KilopoundForceFeetPerDegreesPerFeet => As(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + /// /// Get RotationalStiffnessPerLength in MeganewtonMetersPerRadianPerMeter. /// @@ -180,6 +187,11 @@ public RotationalStiffnessPerLength(double value, UnitSystem unitSystem) /// public double NewtonMetersPerRadianPerMeter => As(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); + /// + /// Get RotationalStiffnessPerLength in PoundForceFeetPerDegreesPerFeet. + /// + public double PoundForceFeetPerDegreesPerFeet => As(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + #endregion #region Static Methods @@ -219,6 +231,15 @@ public static RotationalStiffnessPerLength FromKilonewtonMetersPerRadianPerMeter return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter); } /// + /// Get RotationalStiffnessPerLength from KilopoundForceFeetPerDegreesPerFeet. + /// + /// If value is NaN or Infinity. + public static RotationalStiffnessPerLength FromKilopoundForceFeetPerDegreesPerFeet(QuantityValue kilopoundforcefeetperdegreesperfeet) + { + double value = (double) kilopoundforcefeetperdegreesperfeet; + return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot); + } + /// /// Get RotationalStiffnessPerLength from MeganewtonMetersPerRadianPerMeter. /// /// If value is NaN or Infinity. @@ -236,6 +257,15 @@ public static RotationalStiffnessPerLength FromNewtonMetersPerRadianPerMeter(Qua double value = (double) newtonmetersperradianpermeter; return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter); } + /// + /// Get RotationalStiffnessPerLength from PoundForceFeetPerDegreesPerFeet. + /// + /// If value is NaN or Infinity. + public static RotationalStiffnessPerLength FromPoundForceFeetPerDegreesPerFeet(QuantityValue poundforcefeetperdegreesperfeet) + { + double value = (double) poundforcefeetperdegreesperfeet; + return new RotationalStiffnessPerLength(value, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot); + } /// /// Dynamically convert from value and unit enum to . @@ -666,8 +696,10 @@ private double GetValueInBaseUnit() switch(Unit) { case RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter: return (_value) * 1e3d; + case RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot: return _value*254864.324570; case RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter: return (_value) * 1e6d; case RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter: return _value; + case RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot: return _value*254.864324570; default: throw new NotImplementedException($"Can not convert {Unit} to base units."); } @@ -694,8 +726,10 @@ private double GetValueAs(RotationalStiffnessPerLengthUnit unit) switch(unit) { case RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter: return (baseUnitValue) / 1e3d; + case RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot: return baseUnitValue/254864.324570; case RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter: return (baseUnitValue) / 1e6d; case RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter: return baseUnitValue; + case RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot: return baseUnitValue/254.864324570; default: throw new NotImplementedException($"Can not convert {Unit} to {unit}."); } diff --git a/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs b/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs index efb2b4eba8..cd25e67a86 100644 --- a/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs +++ b/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs @@ -1000,8 +1000,10 @@ private static readonly (string CultureName, Type UnitType, int UnitValue, strin ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.MeganewtonMeterPerRadian, new string[]{"MN·m/rad", "MNm/rad"}), ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.NewtonMeterPerRadian, new string[]{"N·m/rad", "Nm/rad"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new string[]{"kN·m/rad/m", "kNm/rad/m"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/deg/ft"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new string[]{"MN·m/rad/m", "MNm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new string[]{"N·m/rad/m", "Nm/rad/m"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new string[]{"lbf·ft/deg/ft"}), ("en-US", typeof(SolidAngleUnit), (int)SolidAngleUnit.Steradian, new string[]{"sr"}), ("en-US", typeof(SpecificEnergyUnit), (int)SpecificEnergyUnit.BtuPerPound, new string[]{"btu/lb"}), ("en-US", typeof(SpecificEnergyUnit), (int)SpecificEnergyUnit.CaloriePerGram, new string[]{"cal/g"}), diff --git a/UnitsNet/GeneratedCode/UnitConverter.g.cs b/UnitsNet/GeneratedCode/UnitConverter.g.cs index 217f59c0f4..f0e4497f86 100644 --- a/UnitsNet/GeneratedCode/UnitConverter.g.cs +++ b/UnitsNet/GeneratedCode/UnitConverter.g.cs @@ -1554,9 +1554,13 @@ public static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalStiffness.BaseUnit, RotationalStiffness.BaseUnit, q => q); unitConverter.SetConversionFunction(RotationalStiffnessPerLength.BaseUnit, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, q => q.ToUnit(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter)); unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, RotationalStiffnessPerLength.BaseUnit, q => q.ToBaseUnit()); + unitConverter.SetConversionFunction(RotationalStiffnessPerLength.BaseUnit, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, q => q.ToUnit(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot)); + unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, RotationalStiffnessPerLength.BaseUnit, q => q.ToBaseUnit()); unitConverter.SetConversionFunction(RotationalStiffnessPerLength.BaseUnit, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, q => q.ToUnit(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter)); unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, RotationalStiffnessPerLength.BaseUnit, q => q.ToBaseUnit()); unitConverter.SetConversionFunction(RotationalStiffnessPerLength.BaseUnit, RotationalStiffnessPerLength.BaseUnit, q => q); + unitConverter.SetConversionFunction(RotationalStiffnessPerLength.BaseUnit, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, q => q.ToUnit(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot)); + unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, RotationalStiffnessPerLength.BaseUnit, q => q.ToBaseUnit()); unitConverter.SetConversionFunction(SolidAngle.BaseUnit, SolidAngle.BaseUnit, q => q); unitConverter.SetConversionFunction(SpecificEnergy.BaseUnit, SpecificEnergyUnit.BtuPerPound, q => q.ToUnit(SpecificEnergyUnit.BtuPerPound)); unitConverter.SetConversionFunction(SpecificEnergyUnit.BtuPerPound, SpecificEnergy.BaseUnit, q => q.ToBaseUnit()); diff --git a/UnitsNet/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs b/UnitsNet/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs index bb0630f745..5b66a52515 100644 --- a/UnitsNet/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs +++ b/UnitsNet/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs @@ -27,8 +27,10 @@ public enum RotationalStiffnessPerLengthUnit { Undefined = 0, KilonewtonMeterPerRadianPerMeter, + KilopoundForceFootPerDegreesPerFoot, MeganewtonMeterPerRadianPerMeter, NewtonMeterPerRadianPerMeter, + PoundForceFootPerDegreesPerFoot, } #pragma warning restore 1591 From 08bd0a24ddf87c1852e40327cbacdb19b33e8281 Mon Sep 17 00:00:00 2001 From: Dirk Schuermans Date: Fri, 7 Feb 2020 10:32:56 +0100 Subject: [PATCH 2/3] Updated abbreviations according to PR remarks --- Common/UnitDefinitions/RotationalStiffnessPerLength.json | 2 +- .../TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs | 4 ++-- .../GeneratedCode/UnitAbbreviationsCache.g.cs | 2 +- UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Common/UnitDefinitions/RotationalStiffnessPerLength.json b/Common/UnitDefinitions/RotationalStiffnessPerLength.json index 5cd2fbe39d..f4030876d7 100644 --- a/Common/UnitDefinitions/RotationalStiffnessPerLength.json +++ b/Common/UnitDefinitions/RotationalStiffnessPerLength.json @@ -41,7 +41,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "kipf·ft/deg/ft" ] + "Abbreviations": [ "kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft" ] } ] } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index 0ceafd91c2..4cef18335d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -340,7 +340,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString()); - Assert.Equal("1 kipf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString()); + Assert.Equal("1 kipf·ft/°/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString()); Assert.Equal("1 MN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString()); @@ -358,7 +358,7 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString(swedishCulture)); - Assert.Equal("1 kipf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString(swedishCulture)); + Assert.Equal("1 kipf·ft/°/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString(swedishCulture)); Assert.Equal("1 MN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter).ToString(swedishCulture)); Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString(swedishCulture)); Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString(swedishCulture)); diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs index c3e70f956e..b97d35fae0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs @@ -1000,7 +1000,7 @@ private static readonly (string CultureName, Type UnitType, int UnitValue, strin ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.MeganewtonMeterPerRadian, new string[]{"MN·m/rad", "MNm/rad"}), ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.NewtonMeterPerRadian, new string[]{"N·m/rad", "Nm/rad"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new string[]{"kN·m/rad/m", "kNm/rad/m"}), - ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/deg/ft"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new string[]{"MN·m/rad/m", "MNm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new string[]{"N·m/rad/m", "Nm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new string[]{"lbf·ft/deg/ft"}), diff --git a/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs b/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs index cd25e67a86..b13e538601 100644 --- a/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs +++ b/UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs @@ -1000,7 +1000,7 @@ private static readonly (string CultureName, Type UnitType, int UnitValue, strin ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.MeganewtonMeterPerRadian, new string[]{"MN·m/rad", "MNm/rad"}), ("en-US", typeof(RotationalStiffnessUnit), (int)RotationalStiffnessUnit.NewtonMeterPerRadian, new string[]{"N·m/rad", "Nm/rad"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new string[]{"kN·m/rad/m", "kNm/rad/m"}), - ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/deg/ft"}), + ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new string[]{"kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new string[]{"MN·m/rad/m", "MNm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new string[]{"N·m/rad/m", "Nm/rad/m"}), ("en-US", typeof(RotationalStiffnessPerLengthUnit), (int)RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new string[]{"lbf·ft/deg/ft"}), From dd4c5e4bee69247bfcdc0eea736b4ec4b7a69023 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 9 Feb 2020 11:56:05 +0100 Subject: [PATCH 3/3] Regenerate --- .../NumberToForcePerLengthExtensionsTest.g.cs | 4 ++++ .../NumberToRotationalStiffnessExtensionsTest.g.cs | 8 ++++++++ ...umberToRotationalStiffnessPerLengthExtensionsTest.g.cs | 8 ++++++++ .../GeneratedCode/NumberToForcePerLengthExtensions.g.cs | 4 ++++ .../NumberToRotationalStiffnessExtensions.g.cs | 8 ++++++++ .../NumberToRotationalStiffnessPerLengthExtensions.g.cs | 8 ++++++++ 6 files changed, 40 insertions(+) diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForcePerLengthExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForcePerLengthExtensionsTest.g.cs index b65e85dbbe..252c965142 100644 --- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForcePerLengthExtensionsTest.g.cs +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForcePerLengthExtensionsTest.g.cs @@ -40,6 +40,10 @@ public void NumberToKilogramsForcePerMeterTest() => public void NumberToKilonewtonsPerMeterTest() => Assert.Equal(ForcePerLength.FromKilonewtonsPerMeter(2), 2.KilonewtonsPerMeter()); + [Fact] + public void NumberToKilopoundsForcePerFootTest() => + Assert.Equal(ForcePerLength.FromKilopoundsForcePerFoot(2), 2.KilopoundsForcePerFoot()); + [Fact] public void NumberToMeganewtonsPerMeterTest() => Assert.Equal(ForcePerLength.FromMeganewtonsPerMeter(2), 2.MeganewtonsPerMeter()); diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessExtensionsTest.g.cs index f7a3f1c86e..39e5d771c2 100644 --- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessExtensionsTest.g.cs +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessExtensionsTest.g.cs @@ -28,6 +28,10 @@ public class NumberToRotationalStiffnessExtensionsTests public void NumberToKilonewtonMetersPerRadianTest() => Assert.Equal(RotationalStiffness.FromKilonewtonMetersPerRadian(2), 2.KilonewtonMetersPerRadian()); + [Fact] + public void NumberToKilopoundForceFeetPerDegreesTest() => + Assert.Equal(RotationalStiffness.FromKilopoundForceFeetPerDegrees(2), 2.KilopoundForceFeetPerDegrees()); + [Fact] public void NumberToMeganewtonMetersPerRadianTest() => Assert.Equal(RotationalStiffness.FromMeganewtonMetersPerRadian(2), 2.MeganewtonMetersPerRadian()); @@ -36,5 +40,9 @@ public void NumberToMeganewtonMetersPerRadianTest() => public void NumberToNewtonMetersPerRadianTest() => Assert.Equal(RotationalStiffness.FromNewtonMetersPerRadian(2), 2.NewtonMetersPerRadian()); + [Fact] + public void NumberToPoundForceFeetPerDegreesTest() => + Assert.Equal(RotationalStiffness.FromPoundForceFeetPerDegrees(2), 2.PoundForceFeetPerDegrees()); + } } diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensionsTest.g.cs index 39ab459765..8f93a44bd1 100644 --- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensionsTest.g.cs +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensionsTest.g.cs @@ -28,6 +28,10 @@ public class NumberToRotationalStiffnessPerLengthExtensionsTests public void NumberToKilonewtonMetersPerRadianPerMeterTest() => Assert.Equal(RotationalStiffnessPerLength.FromKilonewtonMetersPerRadianPerMeter(2), 2.KilonewtonMetersPerRadianPerMeter()); + [Fact] + public void NumberToKilopoundForceFeetPerDegreesPerFeetTest() => + Assert.Equal(RotationalStiffnessPerLength.FromKilopoundForceFeetPerDegreesPerFeet(2), 2.KilopoundForceFeetPerDegreesPerFeet()); + [Fact] public void NumberToMeganewtonMetersPerRadianPerMeterTest() => Assert.Equal(RotationalStiffnessPerLength.FromMeganewtonMetersPerRadianPerMeter(2), 2.MeganewtonMetersPerRadianPerMeter()); @@ -36,5 +40,9 @@ public void NumberToMeganewtonMetersPerRadianPerMeterTest() => public void NumberToNewtonMetersPerRadianPerMeterTest() => Assert.Equal(RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(2), 2.NewtonMetersPerRadianPerMeter()); + [Fact] + public void NumberToPoundForceFeetPerDegreesPerFeetTest() => + Assert.Equal(RotationalStiffnessPerLength.FromPoundForceFeetPerDegreesPerFeet(2), 2.PoundForceFeetPerDegreesPerFeet()); + } } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs index 5387a82d3b..4aa686fe66 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs @@ -42,6 +42,10 @@ public static ForcePerLength KilogramsForcePerMeter(this T value) => public static ForcePerLength KilonewtonsPerMeter(this T value) => ForcePerLength.FromKilonewtonsPerMeter(Convert.ToDouble(value)); + /// + public static ForcePerLength KilopoundsForcePerFoot(this T value) => + ForcePerLength.FromKilopoundsForcePerFoot(Convert.ToDouble(value)); + /// public static ForcePerLength MeganewtonsPerMeter(this T value) => ForcePerLength.FromMeganewtonsPerMeter(Convert.ToDouble(value)); diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs index 4507164029..a9fe46bc16 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs @@ -30,6 +30,10 @@ public static class NumberToRotationalStiffnessExtensions public static RotationalStiffness KilonewtonMetersPerRadian(this T value) => RotationalStiffness.FromKilonewtonMetersPerRadian(Convert.ToDouble(value)); + /// + public static RotationalStiffness KilopoundForceFeetPerDegrees(this T value) => + RotationalStiffness.FromKilopoundForceFeetPerDegrees(Convert.ToDouble(value)); + /// public static RotationalStiffness MeganewtonMetersPerRadian(this T value) => RotationalStiffness.FromMeganewtonMetersPerRadian(Convert.ToDouble(value)); @@ -38,5 +42,9 @@ public static RotationalStiffness MeganewtonMetersPerRadian(this T value) => public static RotationalStiffness NewtonMetersPerRadian(this T value) => RotationalStiffness.FromNewtonMetersPerRadian(Convert.ToDouble(value)); + /// + public static RotationalStiffness PoundForceFeetPerDegrees(this T value) => + RotationalStiffness.FromPoundForceFeetPerDegrees(Convert.ToDouble(value)); + } } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs index f8577e65eb..97223c992b 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs @@ -30,6 +30,10 @@ public static class NumberToRotationalStiffnessPerLengthExtensions public static RotationalStiffnessPerLength KilonewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromKilonewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); + /// + public static RotationalStiffnessPerLength KilopoundForceFeetPerDegreesPerFeet(this T value) => + RotationalStiffnessPerLength.FromKilopoundForceFeetPerDegreesPerFeet(Convert.ToDouble(value)); + /// public static RotationalStiffnessPerLength MeganewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromMeganewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); @@ -38,5 +42,9 @@ public static RotationalStiffnessPerLength MeganewtonMetersPerRadianPerMeter( public static RotationalStiffnessPerLength NewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); + /// + public static RotationalStiffnessPerLength PoundForceFeetPerDegreesPerFeet(this T value) => + RotationalStiffnessPerLength.FromPoundForceFeetPerDegreesPerFeet(Convert.ToDouble(value)); + } }