# I've been a bad student

**URL:** <https://forum.kirupa.com/t/ive-been-a-bad-student/23098>\
**Category:** Uncategorized\
**Created:** [June 12, 2003, 8:21pm UTC](https://forum.kirupa.com/t/ive-been-a-bad-student/23098 "2003-06-12T20:21:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [June 12, 2003, 8:21pm UTC](https://forum.kirupa.com/t/ive-been-a-bad-student/23098/1 "2003-06-12T20:21:26Z")

</div>

I can remember some elementary math heh  
anyway, could someone help me out with this little problem?

A is a static dot, let’s say A(x,y)  
C(x,y) is the dot of a possible click (could be anywhere)

now i want to know how to calculate the angle that the line A(x,y)and C(x,y) does with the line made by the horizontal passing by A(x,y)

TiA :cool:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 12, 2003, 8:39pm UTC](https://forum.kirupa.com/t/ive-been-a-bad-student/23098/2 "2003-06-12T20:39:21Z")

</div>

```auto

angleInRadians = Math.atan2(C.y-A.y, C.x-A.x);
angleInDegrees = angleInRadians * 180/Math.PI;

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 12, 2003, 8:47pm UTC](https://forum.kirupa.com/t/ive-been-a-bad-student/23098/3 "2003-06-12T20:47:06Z")

</div>

thanks !!! 🙂 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 12, 2003, 8:49pm UTC](https://forum.kirupa.com/t/ive-been-a-bad-student/23098/4 "2003-06-12T20:49:22Z")

</div>

welcome :beam:
