SourceForge.net Logo Home | Download | Submit | Screenshots | FAQ | SF Project Page | JUDO Help | Contact

View a Program

To run this program in JUDO, select the Program Code with your mouse, click the Edit menu of your browser and Copy. Then click in the code area of JUDO, click the Edit menu of JUDO and then Paste. Then Run the program.

Author Name:Edac Leinad
Program Name:Find the angle between two points
Program Description:Simple Program on how to get the angle between two points.

This program uses

Math.atan2(double x, double y);

This is almost the same as

arctan(double slope);

that is already built into JUDO. Math.atan2(x,y) supports full 360 degrees, as well as divide by zero errors.

If you want to go straight to the math, go to line 60.

Program heading:

* @Author Edac Leinad
* point: the base point from which the pointer will be pointing
* target: the point that follows the mouse
* angle: the angle between point and target
*
* Move the mouse around to see the black line continually point
* at your mouse. Press spacebar to stop the point from moving.
* Use the up/down arrow keys to speed up/slow down the point.
 
Program Type:Graphics
Program Code:

Last Modified Sun Dec 22 07:25:00 UTC 2013
Thomas Dunn

Home | Download | Submit | Screenshots | FAQ | SF Project Page | JUDO Help | Contact