# how to calculate sinus/angle between two points

• 12-11-2013, 09:18 PM
veelicus
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?
• 12-11-2013, 09:24 PM
KevinWorkman
Re: how to calculate sinus/angle between two points
Basic trigonometry?
• 12-11-2013, 09:32 PM
veelicus
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
• 12-11-2013, 09:37 PM
jim829
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
• 12-11-2013, 09:38 PM
KevinWorkman
Re: how to calculate sinus/angle between two points
Quote:

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
• 12-15-2013, 10:36 AM
JosAH
Re: how to calculate sinus/angle between two points
Quote:

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
• 12-15-2013, 08:27 PM
jim829
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
• 12-16-2013, 09:18 PM
JosAH
Re: how to calculate sinus/angle between two points
Quote:

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
• 12-17-2013, 10:29 AM
gimbal2
Re: how to calculate sinus/angle between two points
Quote:

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.
• 01-09-2014, 08:17 AM
Daryn
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
• 01-09-2014, 04:08 PM
KevinWorkman
Re: how to calculate sinus/angle between two points
Quote:

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.