Interested Article - Atan2
lauretta
- 2021-08-06
- 1
local p = {}
function p.Atan2(frame)
y=frame.args['y']
x=frame.args['x']
return math.atan2( y, x )
end
function p.Atan2Deg(frame)
y=frame.args['y']
x=frame.args['x']
deg=math.atan2( y, x ) *57.295779
if deg < 0 then
deg=360+deg
end
return deg
end
function p.GalL(frame)
dec=frame.args['dec']
ra=frame.args['ra']
b=frame.args['b']
x=math.cos(dec*0.017453) *math.sin((ra-192.85948)*0.017453) *0.889988
y=math.sin(dec*0.017453) - math.sin(b)*0.455984
l=math.atan2( y, x ) *57.295779
if l < 0 then
l=360+l
end
l=l+32.93192
return l
end
return p
lauretta
- 2021-08-06
- 1