From 05750d669c2b174299d5892858277f5faa06725e Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Wed, 26 Nov 2025 23:49:12 +0100 Subject: [PATCH] Update WmtsTileMatrix.cs --- MapControl/Shared/WmtsTileMatrix.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MapControl/Shared/WmtsTileMatrix.cs b/MapControl/Shared/WmtsTileMatrix.cs index 7022f1c0..7f242a0b 100644 --- a/MapControl/Shared/WmtsTileMatrix.cs +++ b/MapControl/Shared/WmtsTileMatrix.cs @@ -1,4 +1,5 @@ -#if WPF +using System; +#if WPF using System.Windows; #elif AVALONIA using Avalonia; @@ -18,10 +19,9 @@ namespace MapControl public int MatrixWidth => matrixWidth; public int MatrixHeight => matrixHeight; - // Indicates if the total width in meters covers the whole earth - // circumference (minus one millimeter for floating point precision). + // Indicates if the total width in meters matches the earth circumference. // public bool HasFullHorizontalCoverage { get; } = - matrixWidth * tileWidth / scale >= 360d * MapProjection.Wgs84MeterPerDegree - 1e-3; + Math.Abs(matrixWidth * tileWidth / scale - 360d * MapProjection.Wgs84MeterPerDegree) < 1e-3; } }