Hello,
The distance between two points is trivial and can be done in ASOC. But what about the angle?
Given two points (x1,y1) and (x2,y2) how do I get tan(Exp-1)(y2-y1/x2-x1) ?
Thanks!
After edit: ok, there is no way to do it nor in Applescript, neither in ASOC. QuickDraw had a nice function called PtToAngle (aPoint, aRect, returnedAngle) which gave an angle (in deg) between a rectangle and a point. Such a function survived a time in CarbonLib (::ptToAngle) but the freshest source on the web is outdated (2004).
So I’m looking for a replacement (atan): is it part of the C/C++ languages or is there a library somewhere which provides the equivalent (even in rad)?
My question is probably too trivial, as I found nothing in the docs. Is it a kind of “As everybody knows.”?