code: function( dir, result ){
  
              result = result || new Physics.vector();
  
              var x = dir.x
                  ,y = dir.y
                  ;
  
              x = x === 0 ? 0 : x < 0 ? -this.width * 0.5 : this.width * 0.5;
              y = y === 0 ? 0 : y < 0 ? -this.height * 0.5 : this.height * 0.5;
  
              return result.set( x, y );
          }
docs: extended