
ANGRADName:
There are actually two angles defined by these two line segments. One is defined by the counter clockwise direction and the other is defined by the clockwise direction. For example, given the points (0,1), (0,0) and (1,0), the counter clockwise angle is 3*PI/2 (= 4.712389) and the clockwise angle is PI/2 (= 1.570796). This function returns the counter clockwise angle. To return the clockwise angle, you can do something like
<SUBSET/EXCEPT/FOR qualification> where <x1> is a variable or a parameter containing the x coordinates of the first vertex; <y1> is a variable or a parameter containing the y coordinates of the first vertex; <x2> is a variable or a parameter containing the x coordinates of the second vertex; <y2> is a variable or a parameter containing the y coordinates of the second vertex; <x3> is a variable or a parameter containing the x coordinates of the third vertex; <y3> is a variable or a parameter containing the y coordinates of the third vertex; <y> is a variable or a parameter (depending on what the input arguments are) where the computed angle values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = ANGRAD(X1,Y1,X2,Y2,X3,Y3)
LET X1 = DATA 0 1 0 1 LET Y1 = DATA 1 0 1 0 LET X2 = 0 FOR I = 1 1 4 LET Y2 = 0 FOR I = 1 1 4 LET X3 = 1 FOR I = 1 1 4 LET Y3 = 0 FOR I = 1 1 4 LET YANG = ANGRAD(X1,Y1,X2,Y2,X3,Y3) SET WRITE DECIMALS 4 PRINT X1 Y1 YANGThe following output is generated.  X1 Y1 YANG  0.0000 1.0000 4.7123 1.0000 0.0000 3.1415 0.0000 1.0000 1.5707 1.0000 0.0000 0.0000
Date created: 01/07/2013 