If you use atan(x) to calculate the output θ, you have to think about different situations that may occur, because with the same value of x, there are multiple values of θ, and it would be your responsibility to handle that, and find out what is the suitable value of θ.
But, if you have two values y and x, and you want to calculate atan(y / x), there is a better choice: using atan2(y, x); atan2(y, x) can handle the values from all the 4 different quadrants:
Instances of the similar situations can be found by invoking:
git grep atan\(
Within the results of the grep, you can find places that atan2() is better suited. You should take care about the conditions that may be present (or missing) after the atan() in which check the signature of the and make sure that the code works correctly after removing them.
Blog post related to this EasyHack in the LibreOffice Development Blog:
Example commit (hwpfilter/source/hcode.cxx)