Is there a way to write these ifs nicer? August 18, 2023 by Tarik dx, dy = -dy, dx When in doubt, apply maths. 😉