Skip to content

Commit

Permalink
Fix map selection bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MortFred committed Mar 19, 2023
1 parent aef26f6 commit b4c562d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/api/Services/MapService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,9 @@ private static bool CheckMapIsHigherResolution(
List<double[]> referenceMap
)
{
if (checkMap[0][0] < referenceMap[0][0] | checkMap[0][1] < referenceMap[0][1])
{
return false;
}
if (checkMap[1][0] > referenceMap[1][0] | checkMap[1][1] > referenceMap[1][1])
double checkMapArea = (checkMap[1][0] - checkMap[0][0]) * (checkMap[1][1] - checkMap[0][1]);
double referenceMapArea = (referenceMap[1][0] - referenceMap[0][0]) * (referenceMap[1][1] - referenceMap[0][1]);
if (checkMapArea > referenceMapArea)
{
return false;
}
Expand Down

0 comments on commit b4c562d

Please sign in to comment.