## from north (-pi,pi) positive toward east angle.north = function(xx,yy){sign(xx)*(yy<0)*pi + atan(xx/yy)} ## from east (0,2.pi) positive toward north angle = function(xx,yy){atan(yy/xx) - sign(xx)*sign(yy)*pi*(xx<0)}
Post a Comment
No comments:
Post a Comment