[Maxima] the angle of a straight line drawn between 2 points
Richard Fateman
fateman at eecs.berkeley.edu
Sun May 27 14:25:33 CDT 2012
On 5/27/2012 11:51 AM, Adam Majewski wrote:
...
I don't know if the algorithm is right, but the program can be made more
succinct, and
fixed so that b is local...
something like
gt(r,s):=
block([b:
float(atan2(imagpart(s)-imagpart(r),realpart(s)-realpart(r))/2*%pi)],
b + (if (b<0) then 1 else 0))
or even..
gt(r,s):= (r:float(r-s), r: 0.5*atan2(imagpart(r),realpart(r))/?pi,
r+(if (r<0) then 1 else 0))
More information about the Maxima
mailing list