Version 5.1: Use C# 7

This commit is contained in:
ClemensF 2020-04-17 14:40:14 +02:00
parent 310f0cca9a
commit 7bd1d450dc
18 changed files with 42 additions and 35 deletions

View file

@ -15,8 +15,8 @@ namespace MapControl
/// </summary>
public class WorldMercatorProjection : MapProjection
{
public static double ConvergenceTolerance = 1e-6;
public static int MaxIterations = 10;
public static double ConvergenceTolerance { get; set; } = 1e-6;
public static int MaxIterations { get; set; } = 10;
private static readonly double maxLatitude = YToLatitude(180d);
@ -72,8 +72,7 @@ namespace MapControl
var lat = latitude * Math.PI / 180d;
return Math.Log(Math.Tan(lat / 2d + Math.PI / 4d)
* ConformalFactor(lat)) * 180d / Math.PI; // p.44 (7-7)
return Math.Log(Math.Tan(lat / 2d + Math.PI / 4d) * ConformalFactor(lat)) * 180d / Math.PI; // p.44 (7-7)
}
public static double YToLatitude(double y)