! TITLE: ang_diff.mac (CALCULATION) ! ! ! OBJECTIVE: ! ! This sub-macro calculates the subtended angle between 2 angular dimensions, ! angle#1 and angle#2, as measured from angle#1 to angle#2 in a CLOCKWISE ! direction. ! ! ! COMMAND SYNTAX: ! ! ANG_DIFF, angle#1, angle#2 ! ! ! DESCRIPTION: ! ! The convention used here is: ! ! d_angle = angle#1 - angle#2 ! ! The difference between the two angles may then be used to aid in ! a loop of VROTAT functions. In this case, the angle inputs may be from ! the storage array ANG_ARRAY.MAC. It may be used for stand-alone command ! entries as well. ! ! ! *get,prkey_,active,0,prkey /nopr ! ang1_=arg1 ang2_=arg2 ! delta_=ang2_-ang1_ ! *if,delta_,lt,0,then d_angle=abs(delta_) *else d_angle=360-delta_ *endif ! *set,ang1_, *set,ang2_, *set,delta_, ! *if,prkey_,eq,1,then /go *endif