Fix issue 1231 for MathUtils.atan2()