Skip to content

Deprecated Pressure.Psi in favor of Pressure.PoundForcePerSquareInch.… #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion UnitsNet.Tests/CustomCode/PressureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class PressureTests : PressureTestsBase

protected override double PoundsForcePerSquareFootInOnePascal => 0.0208854342;

protected override double PoundsForcePerSquareInchInOnePascal => 0.000145037738;
protected override double PoundsForcePerSquareInchInOnePascal => 0.000145037737730209;

protected override double PsiInOnePascal => 1.450377*1E-4;

Expand Down
1 change: 1 addition & 0 deletions UnitsNet/GeneratedCode/Enums/PressureUnit.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public enum PressureUnit
Pascal,
PoundForcePerSquareFoot,
PoundForcePerSquareInch,
[System.Obsolete("Deprecated due to github issue #215, please use PoundForcePerSquareInch instead")]
Psi,
TechnicalAtmosphere,
TonneForcePerSquareCentimeter,
Expand Down
9 changes: 5 additions & 4 deletions UnitsNet/GeneratedCode/UnitClasses/Pressure.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public double KilopoundsForcePerSquareFoot
/// </summary>
public double KilopoundsForcePerSquareInch
{
get { return (_pascals*0.000145037725185479) / 1e3d; }
get { return (_pascals*0.000145037737730209) / 1e3d; }
}

/// <summary>
Expand Down Expand Up @@ -323,12 +323,13 @@ public double PoundsForcePerSquareFoot
/// </summary>
public double PoundsForcePerSquareInch
{
get { return _pascals*0.000145037725185479; }
get { return _pascals*0.000145037737730209; }
}

/// <summary>
/// Get Pressure in Psi.
/// </summary>
[System.Obsolete("Deprecated due to github issue #215, please use PoundForcePerSquareInch instead")]
public double Psi
{
get { return _pascals/(6.89464975179*1e3); }
Expand Down Expand Up @@ -516,7 +517,7 @@ public static Pressure FromKilopoundsForcePerSquareFoot(double kilopoundsforcepe
/// </summary>
public static Pressure FromKilopoundsForcePerSquareInch(double kilopoundsforcepersquareinch)
{
return new Pressure((kilopoundsforcepersquareinch*6894.75788951576) * 1e3d);
return new Pressure((kilopoundsforcepersquareinch*6894.75729316836) * 1e3d);
}

/// <summary>
Expand Down Expand Up @@ -596,7 +597,7 @@ public static Pressure FromPoundsForcePerSquareFoot(double poundsforcepersquaref
/// </summary>
public static Pressure FromPoundsForcePerSquareInch(double poundsforcepersquareinch)
{
return new Pressure(poundsforcepersquareinch*6894.75788951576);
return new Pressure(poundsforcepersquareinch*6894.75729316836);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion UnitsNet/GeneratedCode/UnitSystem.Default.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ private static readonly ReadOnlyCollection<UnitLocalization> DefaultLocalization
new CulturesForEnumValue((int) PressureUnit.PoundForcePerSquareInch,
new[]
{
new AbbreviationsForCulture("en-US", "lb/in²"),
new AbbreviationsForCulture("en-US", "psi", "lb/in²"),
}),
new CulturesForEnumValue((int) PressureUnit.Psi,
new[]
Expand Down
7 changes: 4 additions & 3 deletions UnitsNet/Scripts/UnitDefinitions/Pressure.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
{
"SingularName": "Psi",
"PluralName": "Psi",
"ObsoleteText": "Deprecated due to github issue #215, please use PoundForcePerSquareInch instead",
"FromUnitToBaseFunc": "x*6.89464975179*1e3",
"FromBaseToUnitFunc": "x/(6.89464975179*1e3)",
"Localization": [
Expand Down Expand Up @@ -210,13 +211,13 @@
{
"SingularName": "PoundForcePerSquareInch",
"PluralName": "PoundsForcePerSquareInch",
"FromUnitToBaseFunc": "x*6894.75788951576",
"FromBaseToUnitFunc": "x*0.000145037725185479",
"FromUnitToBaseFunc": "x*6894.75729316836",
"FromBaseToUnitFunc": "x*0.000145037737730209",
"Prefixes": [ "Kilo" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "lb/in²" ],
"Abbreviations": [ "psi", "lb/in²" ],
"AbbreviationsWithPrefixes": [ "kipf/in²" ]
}
]
Expand Down