Skip to content

Commit 1b2d790

Browse files
committed
+
1 parent e42e67d commit 1b2d790

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<EnablePackageVersionOverride>true</EnablePackageVersionOverride>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageVersion Include="BenchmarkDotNet" Version="0.15.4" />
8+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
99
<PackageVersion Include="coverlet.collector" Version="6.0.4">
1010
<PrivateAssets>all</PrivateAssets>
1111
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@@ -26,4 +26,4 @@
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
</PackageVersion>
2828
</ItemGroup>
29-
</Project>
29+
</Project>

src/Geopack/Geopack.T96Mgnp.cs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@ public Magnetopause T96Mgnp(
1616
throw new InvalidOperationException("Location must be in GSW system.");
1717
}
1818

19-
double pd;
20-
if (vel < 0.0)
21-
{
22-
pd = xnPd;
23-
}
24-
else
25-
{
26-
pd = GeopackConstants.SolarWindDynamicPressureFactor * xnPd * vel * vel;
27-
}
19+
double pd = vel < 0.0
20+
? xnPd
21+
: GeopackConstants.SolarWindDynamicPressureFactor * xnPd * vel * vel;
2822

2923
if (pd is 0D)
3024
{
@@ -45,15 +39,9 @@ public Magnetopause T96Mgnp(
4539
double x0 = x00 / rat16;
4640
double xm = x0 - a;
4741

48-
double phi;
49-
if (location.Y is not 0.0 || location.Z is not 0.0)
50-
{
51-
phi = Math.Atan2(location.Y, location.Z);
52-
}
53-
else
54-
{
55-
phi = 0.0D;
56-
}
42+
double phi = location.Y is not 0.0 || location.Z is not 0.0
43+
? Math.Atan2(location.Y, location.Z)
44+
: 0.0D;
5745

5846
double rho = Math.Sqrt(location.Y * location.Y + location.Z * location.Z);
5947

0 commit comments

Comments
 (0)