function(o) {
            o = (o && point(o)) || point(0,0);
            var x = this.x;
            var y = this.y;
            this.x = sqrt((x-o.x)*(x-o.x) + (y-o.y)*(y-o.y));   // r
            this.y = toRad(o.theta(point(x,y)));
            return this;
        }
function(o) {
            o = (o && point(o)) || point(0,0);
            var x = this.x;
            var y = this.y;
            this.x = sqrt((x-o.x)*(x-o.x) + (y-o.y)*(y-o.y));   
            this.y = toRad(o.theta(point(x,y)));
            return this;
        }
function ( o ) { o = ( o && point ( o ) ) || point ( 0 , 0 ) ; var x = this . x ; var y = this . y ; this . x = sqrt ( ( x - o . x ) * ( x - o . x ) + ( y - o . y ) * ( y - o . y ) ) ; // r this . y = toRad ( o . theta ( point ( x , y ) ) ) ; return this ; }
Converts rectangular to polar coordinates. An origin can be specified, otherwise it's 0@0.
Converts rectangular to polar coordinates . An origin can be specified otherwise it s 0