Thread: how to calculate sinus/angle between two points

1. Member
Join Date
Dec 2013
Posts
2
Rep Power
0

how to calculate sinus/angle between two points

Hi,
I need to know the sinus or angle between two points (x1,y1) and (x2,y2).
¿someone knows a formulae to calculate this?

2. Re: how to calculate sinus/angle between two points

Basic trigonometry?

3. Member
Join Date
Dec 2013
Posts
2
Rep Power
0

Re: how to calculate sinus/angle between two points

yes, but i don't know if there is a fast way using any lib to get the solution

4. Senior Member
Join Date
Jan 2013
Location
United States
Posts
2,713
Rep Power
4

Re: how to calculate sinus/angle between two points

I am not certain what you mean. Two points constitute a straight line. So what angle are you talking about?

Regards,
Jim

5. Re: how to calculate sinus/angle between two points

Originally Posted by veelicus
yes, but i don't know if there is a fast way using any lib to get the solution
Check out the API for the Math class.

Java Platform SE 7

6. Re: how to calculate sinus/angle between two points

Originally Posted by veelicus
Hi,
I need to know the sinus or angle between two points (x1,y1) and (x2,y2).
¿someone knows a formulae to calculate this?
Sigh, don't they teach basic math 101 anymore? Subtract, say P1 from both P1 and P2; you get O= (0, 0) and X= (x2-x1, y2-y1) == (x, y). The hypothenuse of the triangle is h= sqrt(x*x+y*y); the sine is y/h, the cosine is x/h and the tangent is y/x. People nowadays first start banging their keyboards without thinking and then they are stuck ...

kind regards,

Jos

7. Senior Member
Join Date
Jan 2013
Location
United States
Posts
2,713
Rep Power
4

Re: how to calculate sinus/angle between two points

I would agree if the OP had said that was the hypotenuse. But one could also assume it was one of the other sides. So the question as stated makes no sense.

Regards,
Jim

8. Re: how to calculate sinus/angle between two points

Originally Posted by jim829
I would agree if the OP had said that was the hypotenuse. But one could also assume it was one of the other sides. So the question as stated makes no sense.
True; I have been lecturing for a short while (at a university by Jove) and I learned to complete, reinterpret and understand poorly worded questions that didn't make sense at all, The communication the other way around needs to be compact, exact and to the point at max and delivered prompty, otherwise the lecturer were sloppy, was an *sshole etc. etc. etc. ;-)

kind regards,

Jos

9. Just a guy
Join Date
Jun 2013
Location
Netherlands
Posts
2,630
Rep Power
3

Re: how to calculate sinus/angle between two points

Originally Posted by JosAH
was an *sshole etc. etc. etc. ;-)
Yeah well sometimes they really are! ;)

One thing I have come to realize: the unfinished questions people would ask in a classroom are absolutely not of the same level of incompleteness as the questions asked in forums.

10. Senior Member
Join Date
Oct 2012
Posts
166
Rep Power
2

Re: how to calculate sinus/angle between two points

Hang on hes talking about hypotneus? How do you see that i figuered he was trying to do slope

11. Re: how to calculate sinus/angle between two points

Originally Posted by Daryn
Hang on hes talking about hypotneus? How do you see that i figuered he was trying to do slope
You can make an imaginary triangle out of the slope, with the slope being the hypotenuse.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•