Skip to content

Commit

Permalink
Fix typo: Celcius -> Celsius (#1347)
Browse files Browse the repository at this point in the history
Came across this while working on #1329. I'm afraid it's an API-breaking
change, so maybe it should wait for v6?

Related:
#1200
  • Loading branch information
Muximize authored Jan 2, 2024
1 parent 99bf265 commit cff63a6
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions Common/UnitDefinitions/TemperatureGradient.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"SingularName": "DegreeCelsiusPerMeter",
"PluralName": "DegreesCelciusPerMeter",
"PluralName": "DegreesCelsiusPerMeter",
"BaseUnits": {
"L": "Meter",
"Θ": "DegreeCelsius"
Expand Down Expand Up @@ -57,7 +57,7 @@
},
{
"SingularName": "DegreeCelsiusPerKilometer",
"PluralName": "DegreesCelciusPerKilometer",
"PluralName": "DegreesCelsiusPerKilometer",
"BaseUnits": {
"L": "Kilometer",
"Θ": "DegreeCelsius"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions UnitsNet.Tests/CustomCode/TemperatureGradientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class TemperatureGradientTests : TemperatureGradientTestsBase
{
protected override bool SupportsSIUnitSystem => true;

protected override double DegreesCelciusPerKilometerInOneKelvinPerMeter => 1000;
protected override double DegreesCelsiusPerKilometerInOneKelvinPerMeter => 1000;

protected override double DegreesCelciusPerMeterInOneKelvinPerMeter => 1;
protected override double DegreesCelsiusPerMeterInOneKelvinPerMeter => 1;

protected override double DegreesFahrenheitPerFootInOneKelvinPerMeter => 0.54864;

Expand All @@ -37,28 +37,28 @@ public class TemperatureGradientTests : TemperatureGradientTestsBase
[Fact]
public void TemperatureDeltaDividedByTemperatureGradientEqualsLength()
{
Length length = TemperatureDelta.FromDegreesCelsius(50) / TemperatureGradient.FromDegreesCelciusPerKilometer(5);
Length length = TemperatureDelta.FromDegreesCelsius(50) / TemperatureGradient.FromDegreesCelsiusPerKilometer(5);
Assert.Equal(length, Length.FromKilometers(10));
}

[Fact]
public void TemperatureDeltaDividedByLengthEqualsTemperatureGradient()
{
TemperatureGradient temperatureGradient = TemperatureDelta.FromDegreesCelsius(50) / Length.FromKilometers(10);
Assert.Equal(5, temperatureGradient.DegreesCelciusPerKilometer);
Assert.Equal(5, temperatureGradient.DegreesCelsiusPerKilometer);
}

[Fact]
public void LengthMultipliedByTemperatureGradientEqualsTemperatureDelta()
{
TemperatureDelta temperatureDelta = Length.FromKilometers(10) * TemperatureGradient.FromDegreesCelciusPerKilometer(5);
TemperatureDelta temperatureDelta = Length.FromKilometers(10) * TemperatureGradient.FromDegreesCelsiusPerKilometer(5);
Assert.Equal(temperatureDelta, TemperatureDelta.FromDegreesCelsius(50));
}

[Fact]
public void TemperatureGradientMultipliedByLengthEqualsTemperatureDelta()
{
TemperatureDelta temperatureDelta = TemperatureGradient.FromDegreesCelciusPerKilometer(5) * Length.FromKilometers(10);
TemperatureDelta temperatureDelta = TemperatureGradient.FromDegreesCelsiusPerKilometer(5) * Length.FromKilometers(10);
Assert.Equal(temperatureDelta, TemperatureDelta.FromDegreesCelsius(50));
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnitsNet/CustomCode/Quantities/TemperatureGradient.extra.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial struct TemperatureGradient
/// <summary>Get <see cref="Length"/> from <see cref="TemperatureDelta"/> divided by <see cref="TemperatureGradient"/>.</summary>
public static Length operator /(TemperatureDelta left, TemperatureGradient right)
{
return Length.FromKilometers(left.Kelvins / right.DegreesCelciusPerKilometer);
return Length.FromKilometers(left.Kelvins / right.DegreesCelsiusPerKilometer);
}

/// <summary>Get <see cref="TemperatureDelta"/> from <see cref="Length"/> times <see cref="TemperatureGradient"/>.</summary>
Expand All @@ -17,7 +17,7 @@ public partial struct TemperatureGradient
/// <summary>Get <see cref="TemperatureDelta"/> from <see cref="TemperatureGradient"/> times <see cref="Length"/>.</summary>
public static TemperatureDelta operator *(TemperatureGradient left, Length right)
{
return TemperatureDelta.FromDegreesCelsius(left.DegreesCelciusPerKilometer * right.Kilometers);
return TemperatureDelta.FromDegreesCelsius(left.DegreesCelsiusPerKilometer * right.Kilometers);
}
}
}
Loading

0 comments on commit cff63a6

Please sign in to comment.