Hi, I'm new, I hope this is the right forum for this!
I am trying to re-create a model I wrote years ago, (lost the source code), One requirement is an algorythm that will calculate the angle, between two points on a plane, from the x,y coordinates of the start and finish; I will be writing in Pascal or Object pascal, but I am NOT asking for code, just the algorythm. However, if you do NOT have the design but do have code, I will be happy to look at that
I think you have to provide some additional information. Two points make a single line or at least can do so.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
I had not come across te cartesian to polor convertion thing but it is allmost exactly what I am doing now with one great difference.
I am NOT calculating the angle as if the start point is at 0.0. If I do that and simple translate the start x,y, it makes my method far neater. Thanks for that.
I think there is another problem with the code which I have not discovered the cause of, I'll be back!
Bookmarks