Angle
Author |
Message |
Flikerator
|
Posted: Wed Apr 19, 2006 7:15 am Post subject: Angle |
|
|
If im given three coordinates how do I find the angle of the three points? (That they make with each other).
Like (2,1) (3,0) (5,7)
At (3,0) the forumula for the angle would be- |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Andy
|
Posted: Wed Apr 19, 2006 9:59 am Post subject: (No subject) |
|
|
ever heard of cosine law?
this shouldnt be in general programming.
moved |
|
|
|
|
|
MysticVegeta
|
Posted: Wed Apr 19, 2006 1:52 pm Post subject: (No subject) |
|
|
Find distance between them (Math.Distance)
Name the sides, A, B, C;
A^2 = B^2 + C^2 - 2*B*C*cos(A)
plugin, vals, find cos A, use inverse get angle |
|
|
|
|
|
codemage
|
Posted: Thu Apr 20, 2006 9:05 am Post subject: (No subject) |
|
|
That's odd. I distinctly remember the last time I used COS law, and it was thinly sliced cabbage. |
|
|
|
|
|
zylum
|
Posted: Thu Apr 20, 2006 10:42 am Post subject: (No subject) |
|
|
ha ha ha! |
|
|
|
|
|
Flikerator
|
|
|
|
|
Andy
|
Posted: Thu Apr 20, 2006 12:04 pm Post subject: (No subject) |
|
|
why dont you check if it's an obtuse angle and if it is just find the reflex of the reflex |
|
|
|
|
|
|
|