lib/toxi/geom/Polygon2D.js
function( origin ){
            var centroid = this.getCentroid();
            var delta = origin !== undefined ? origin.sub( centroid ) : centroid.invert();
            for( var i=0, l = this.vertices.length; i<l; i++){
                this.vertices[i].addSelf( delta );
            }
            return this;
        }
function( origin ){
            var centroid = this.getCentroid();
            var delta = origin !== undefined ? origin.sub( centroid ) : centroid.invert();
            for( var i=0, l = this.vertices.length; i<l; i++){
                this.vertices[i].addSelf( delta );
            }
            return this;
        }
function ( origin ) { var centroid = this . getCentroid ( ) ; var delta = origin !== undefined ? origin . sub ( centroid ) : centroid . invert ( ) ; for ( var i = 0 , l = this . vertices . length ; i < l ; i ++ ) { this . vertices [ i ] . addSelf ( delta ) ; } return this ; }
centers the polygon so that its new centroid is at the given point
@param {Vec2D} [origin]
@return itself
centers the polygon so that its new centroid is at the given point