lib/core: fix order of the params of `atan(y, x)`