Fix centering and movement for small windows
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 18 Apr 2024 07:57:14 +0000 (09:57 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 18 Apr 2024 07:57:14 +0000 (09:57 +0200)
commit7d053fce995c6ae7e41c4503f9ee30a4bff832ce
tree8c064e22942e70df540e6f120ccb1ec539df5bb7
parent6dea4de098df4232727cce51aecd85002eeeec50
Fix centering and movement for small windows

Centering was calculated based on default values hence it was wrong for
different sizes of window. Solved by moving the calculation after
argument parsing.
Movement was impossible for small windows, as the calculated movement
was smaller than a pixel which got rounded to 0. Solved by assigning
signum of movement when 0 is calculated.
main.c