Calculate the angle

Blitz3D Forums/Blitz3D Programming/Calculate the angle

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have a little problem (more of a math than a programming problem :-).

I draw a line using the following code:

Line 320,240,MouseX(),MouseY()


Now I want to calculate the angle of the line, for example if my Mouse Coordinates are (320,100) it should return 0°, if they are (500,240) it should return 90° and so on...

I'm sure someone can help me... ;)