Math.atan2 calls are using arguments in the wrong order

Three Math.atan2 calls are sending the arguments in the wrong order according to the [documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2). The bug causes these functions to return the wrong angles. Every other usage of Math.atan2() is using the arguments in the correct order.