Skip to content
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

Fix typo: Celcius -> Celsius #1347

Merged
merged 1 commit into from
Jan 2, 2024
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
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