Small refactoring for previous commit.

This commit is contained in:
MobiusDev 2017-09-26 21:37:19 +00:00
parent 895cf3b173
commit e2efcc4170
5 changed files with 15 additions and 20 deletions

View File

@ -273,13 +273,12 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y; final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null // if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y)) if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{ {
return null;
}
return _blocks[x][y]; return _blocks[x][y];
} }
return null;
}
/** /**
* Check if geo coordinates has geo. * Check if geo coordinates has geo.

View File

@ -273,13 +273,12 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y; final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null // if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y)) if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{ {
return null;
}
return _blocks[x][y]; return _blocks[x][y];
} }
return null;
}
/** /**
* Check if geo coordinates has geo. * Check if geo coordinates has geo.

View File

@ -273,13 +273,12 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y; final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null // if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y)) if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{ {
return null;
}
return _blocks[x][y]; return _blocks[x][y];
} }
return null;
}
/** /**
* Check if geo coordinates has geo. * Check if geo coordinates has geo.

View File

@ -271,13 +271,12 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y; final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null // if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y)) if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{ {
return null;
}
return _blocks[x][y]; return _blocks[x][y];
} }
return null;
}
/** /**
* Check if geo coordinates has geo. * Check if geo coordinates has geo.

View File

@ -273,13 +273,12 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y; final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null // if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y)) if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{ {
return null;
}
return _blocks[x][y]; return _blocks[x][y];
} }
return null;
}
/** /**
* Check if geo coordinates has geo. * Check if geo coordinates has geo.