Calculating Angle from Coordinates.
Edit: Hm. Possibly this would be better suited to the general forum area, but I missed that when scanning through the sections. Please could it be moved there, if deemed more suitable for that area? Sorry to be a bother!
I recently recieved an assignment from my college (I'm on a BTEC IT Course), to create a program in Delphi designed to aid high school students in learning angles and coordinates and the like.
Now, the trouble with this is that I actually do not know the equations for the program I am supposed to be making, and so I came here for some help :)
I created a quick example image in Photoshop, to help explain what I require:
Assuming that the red dot is X, the blue dot is Y, and 0 degrees is straight up, I require some sort of equation that will calculate the angle in degrees to make point X face point Y. So in the example above, it would be 45 degrees.
The program I have been told to make has to provide a simple graph, like the one above, and allow the user to plot two points, again like above. It would then calculate the angle and output it.
I hope I have made myself clear enough, and I hope I chose the correct forum section... I couldn't find an angles/degrees specific forum, so Trigonometry seemed to be the next best thing.
Thanks for reading, and thanks to any who help or attempt to ;)
PS: I have absolutely no idea how easy/hard this is - I'm extremely bad at maths! :(