Skip to content

Commit 3501e1e

Browse files
ngeslinangularsen
authored andcommitted
Adding RatioChangeRate unit (#678)
* Added RatioChangeRate unit * Fixing issues for RatioChangeRate - Use of DecimalFractionPerSecond as base unit - Correction of the documentation - Adding abbreviation for DecimalFractionPerSecond
1 parent 2295299 commit 3501e1e

File tree

13 files changed

+1854
-0
lines changed

13 files changed

+1854
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"Name": "RatioChangeRate",
3+
"BaseUnit": "DecimalFractionPerSecond",
4+
"XmlDoc": "The change in ratio per unit of time.",
5+
"Units": [
6+
{
7+
"SingularName": "PercentPerSecond",
8+
"PluralName": "PercentsPerSecond",
9+
"FromUnitToBaseFunc": "x",
10+
"FromBaseToUnitFunc": "x",
11+
"Localization": [
12+
{
13+
"Culture": "en-US",
14+
"Abbreviations": [ "%/s" ]
15+
}
16+
]
17+
},
18+
{
19+
"SingularName": "DecimalFractionPerSecond",
20+
"PluralName": "DecimalFractionsPerSecond",
21+
"FromUnitToBaseFunc": "x*1e2",
22+
"FromBaseToUnitFunc": "x/1e2",
23+
"Localization": [
24+
{
25+
"Culture": "en-US",
26+
"Abbreviations": [ "/s" ]
27+
}
28+
]
29+
}
30+
31+
]
32+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by \generate-code.bat.
4+
//
5+
// Changes to this file will be lost when the code is regenerated.
6+
// The build server regenerates the code before each build and a pre-build
7+
// step will regenerate the code on each local build.
8+
//
9+
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
10+
//
11+
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
12+
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
13+
//
14+
// </auto-generated>
15+
//------------------------------------------------------------------------------
16+
17+
// Licensed under MIT No Attribution, see LICENSE file at the root.
18+
// Copyright 2013 Andreas Gullberg Larsen ([email protected]). Maintained at https://github.com/angularsen/UnitsNet.
19+
20+
using System;
21+
22+
namespace UnitsNet.Tests.CustomCode
23+
{
24+
public class RatioChangeRateTests : RatioChangeRateTestsBase
25+
{
26+
protected override double DecimalFractionsPerSecondInOneDecimalFractionPerSecond => 1;
27+
protected override double PercentsPerSecondInOneDecimalFractionPerSecond => 100;
28+
}
29+
}

UnitsNet.Tests/GeneratedCode/RatioChangeRateTestsBase.g.cs

Lines changed: 253 additions & 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)