def polar(x, y, deg=<NUM_LIT:0>):        
if deg:<EOL><INDENT>return hypot(x, y), <NUM_LIT> * atan2(y, x) / pi<EOL><DEDENT>else:<EOL><INDENT>return hypot(x, y), atan2(y, x)<EOL><DEDENT>
Convert from rectangular (x,y) to polar (r,w)
        r = sqrt(x^2 + y^2)
        w = arctan(y/x) = [-\pi,\pi] = [-180,180]