Исправил ошибки

This commit is contained in:
Павел Путилин 2022-10-04 15:43:15 +04:00
parent 823b1e5890
commit 65eddefb53

View File

@ -59,7 +59,7 @@ namespace AirplaneWithRadar
_pictureWidth = width;
_pictureHeight = height;
if (x < 0 || y < 0 || width <= _airplaneWidth || height <= _airplaneHeight || x - _airplaneWidth < width || y - _airplaneHeight < height)
if (x < 0 || y < 0 || width <= _airplaneWidth || height <= _airplaneHeight || x + _airplaneWidth > width || y + _airplaneHeight > height)
{
_pictureHeight = null;
_pictureWidth = null;