Skip to content

Commit c6f263a

Browse files
bradtglassangularsen
authored andcommitted
Add revolutions per second squared unit to rotational acceleration (#665)
* Add RevolutionsPerSecondPerSecond unit to RotationalAcceleration * Regenerate code * Add test stub for RevolutionsPerSecondPerSecond * Rename RevolutionsPerSecondPerSecond to RevolutionPerSecondSquared and change test stub to use constant value Constant value taken from https://www.smartconversion.com/unit_conversion/angular_acceleration_converter.aspx
1 parent 469a05b commit c6f263a

File tree

9 files changed

+61
-0
lines changed

9 files changed

+61
-0
lines changed

Common/UnitDefinitions/RotationalAcceleration.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@
4141
"Abbreviations": [ "rpm/s" ]
4242
}
4343
]
44+
},
45+
{
46+
"SingularName": "RevolutionPerSecondSquared",
47+
"PluralName": "RevolutionsPerSecondSquared",
48+
"FromUnitToBaseFunc": "(2*Math.PI)*x",
49+
"FromBaseToUnitFunc": "(1/(2*Math.PI))*x",
50+
"Localization": [
51+
{
52+
"Culture": "en-US",
53+
"Abbreviations": [ "r/s²" ]
54+
}
55+
]
4456
}
4557
]
4658
}

UnitsNet.Tests/CustomCode/RotationalAccelerationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ public class RotationalAccelerationTests : RotationalAccelerationTestsBase
3030
protected override double DegreesPerSecondSquaredInOneRadianPerSecondSquared => 180 / Math.PI;
3131
protected override double RadiansPerSecondSquaredInOneRadianPerSecondSquared => 1;
3232
protected override double RevolutionsPerMinutePerSecondInOneRadianPerSecondSquared => 9.549296586;
33+
protected override double RevolutionsPerSecondSquaredInOneRadianPerSecondSquared=> 0.159154943091895;
3334
}
3435
}

UnitsNet.Tests/GeneratedCode/RotationalAccelerationTestsBase.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.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.WindowsRuntimeComponent/GeneratedCode/Units/RotationalAccelerationUnit.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/GeneratedCode/Quantities/RotationalAcceleration.g.cs

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

UnitsNet/GeneratedCode/UnitAbbreviationsCache.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/GeneratedCode/Units/RotationalAccelerationUnit.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.

0 commit comments

Comments
 (0)