//Точка входит в квадрат? bool Check(RectangleShape rect, CircleShape shape){ Vector2f coordrect = rect.getPosition(); Vector2f coordshape = shape.getPosition(); if (coordrect.x <= coordshape.x && coordrect.y <= coordshape.y && coordrect.x + rect.getSize().x >= coordshape.x && coordrect.y + rect.getSize().y >= coordshape.y) { return true; } else { return false; } }
float x() const noexcept { return shape.getPosition().x; }
float x() { return shape.getPosition().x; }