code: function( dir, result, margin ){
  
              var x, y;
              result = this.getFarthestHullPoint( dir, result );
              x = result.x;
              y = result.y;
              result.x = x === 0 ? 0 : x < 0 ? x + margin : x - margin;
              result.y = y === 0 ? 0 : y < 0 ? y + margin : y - margin;
  
              return result;
          }
docs: extended