# Two Ordered Pairs

• Jun 8th 2007, 05:17 PM
questforknowledge004
Two Ordered Pairs
I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen
• Jun 8th 2007, 05:46 PM
Quick
Quote:

Originally Posted by questforknowledge004
I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen

Do you want angle a?

Code:

```  /|\   |   |    +   |  /    |  /   | +_a____ <--|------------->   |   |   \|/```
If so then you're looking for slope in degrees form.

It just so happens that the slope equals the tangent of angle a, so all you need to do is calculate the \$\displaystyle \tan^{-1}\$ of the slope.

For instance, your slope is 1, so the angle is: \$\displaystyle \tan^{-1}(1)=45^{\circ}\$
• Jun 9th 2007, 07:34 AM
CaptainBlack
Quote:

Originally Posted by questforknowledge004
I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen

Which angle? The angle that the line joining the points (x1,y1) and (x2,y2)
makes with the horizontal? The angle between the vectors (x1,y1) and (x2,y2)? ...

RonL