244 @verb #450:"bearing" this none this rxdo #7407 @program #450:"bearing" this none this {loca, locb} = args xdist = tofloat(abs(loca[1] - locb[1])) ydist = tofloat(abs(loca[2] - locb[2])) zdist = tofloat(abs(loca[3] - locb[3])) xydist = sqrt(xdist ^ 2.0 + ydist ^ 2.0) if (xydist < 0.0001) ang = 0.0 else ang = asin(tofloat(xdist) / tofloat(xydist)) endif xyzdist = sqrt(xydist ^ 2.0 + zdist ^ 2.0) if (xyzdist < 0.0001) zang = 0.0 else zang = acos(xydist / xyzdist) endif return {ang * (180.0 / (atan(1.0) * 4.0)), zang * (180.0 / (atan(1.0) * 4.0))} . 0