x1,y1,z1 - own coordinates
x2,y2,z2 - target coordinates
alpha - angle from x axis clock backward direction in degrees
if (225 < 180/pi*acrtg((y2-y1)/(x2-x1)) - alpha ) or
(315 > 180/pi*acrtg((y2-y1)/(x2-x1)) - alpha ) then 'target behind'
p.s. netu rysskogo, no nadejus ponjatno
|