79814538

Date: 2025-11-09 01:04:33
Score: 1
Natty:
Report link
float y_shapeBottom = m_shape->getPosition().y - (m_shape->getSize() / 2);
float y_shapeTop = m_shape->getPosition().y + (m_shape->getSize() / 2);

The + and - signs are reversed because the window's initial coordinate is in the upper-left corner. Corrected code:

float y_shapeBottom = m_shape->getPosition().y + (m_shape->getSize() / 2);
float y_shapeTop = m_shape->getPosition().y - (m_shape->getSize() / 2);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: knight