code: function(o) {
  
              o = (o && new Point(o)) || new 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(new Point(x, y)));
              return this;
          }
docs: Converts rectangular to polar coordinates. An origin can be specified, otherwise it's 0@0.