# Understanding the Atan2, Please help

**URL:** <https://discourse.processing.org/t/understanding-the-atan2-please-help/26928>\
**Category:** Beginners\
**Created:** [January 9, 2021, 6:44pm UTC](https://discourse.processing.org/t/understanding-the-atan2-please-help/26928 "2021-01-09T18:44:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [January 9, 2021, 7:20pm UTC](https://discourse.processing.org/t/understanding-the-atan2-please-help/26928/6 "2021-01-09T19:20:23Z")

</div>

you need to swap from `atan2(y1-y2,x1-x2)` to `atan2(y2-y1,x2-x1)`

---

_[View the full topic](https://discourse.processing.org/t/understanding-the-atan2-please-help/26928)._
