Skip to content

Commit db0956f

Browse files
committed
Removed all unnecessary structs
1 parent 2af78f2 commit db0956f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

GeographicLib/Geodesic.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ public sealed class Geodesic
240240
private static readonly double tolb_ = tol0_ * tol2_;
241241
private static readonly double xthresh_ = 1000 * tol2_;
242242

243-
internal double _a, _f, _f1, _e2, _ep2, _b, _c2;
244-
private double _n, _etol2;
245-
private double[] _A3x, _C3x, _C4x;
243+
internal readonly double _a, _f, _f1, _e2, _ep2, _b, _c2;
244+
private readonly double _n, _etol2;
245+
private readonly double[] _A3x, _C3x, _C4x;
246246

247247
/**
248248
* Constructor for a ellipsoid with
@@ -1294,9 +1294,9 @@ public GeodesicLine Line(double lat1, double lon1, double azi1, int caps)
12941294
* A global instantiation of Geodesic with the parameters for the WGS84
12951295
* ellipsoid.
12961296
**********************************************************************/
1297-
private static readonly Lazy<Geodesic> _wgs84 = new Lazy<Geodesic>(() => new Geodesic(Constants.WGS84_a, Constants.WGS84_f), true);
1297+
private static readonly Geodesic _wgs84 = new Geodesic(Constants.WGS84_a, Constants.WGS84_f);
12981298

1299-
public static Geodesic WGS84 => _wgs84.Value;
1299+
public static Geodesic WGS84 => _wgs84;
13001300

13011301
// This is a reformulation of the geodesic problem. The notation is as
13021302
// follows:

GeographicLib/GeodesicData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace GeographicLib
2020
* Geodesic#Inverse(double, double, double, double) Geodesic.Inverse} and it
2121
* always includes the field <i>a12</i>.
2222
**********************************************************************/
23-
public class GeodesicData
23+
public sealed class GeodesicData
2424
{
2525
/// <summary>
2626
/// latitude of point 1 (degrees).

0 commit comments

Comments
 (0)