cx = Math.abs(cx * factor); cy = Math.abs(cy * factor);
cx *= factor; cy *= factor;
    public Point getCenter() {	// if the OMPoly isn't generated, then you can't calculate it.	// We're working in x/y space here, so it looks right.	if (getNeedToRegenerate()) {	    return null;	}	float cx = 0.0f;	float cy = 0.0f;	float A = (float)calculateProjectedArea();	int j = 0;	float factor = 0;	int[] xpts = xpoints[0];	int[] ypts = ypoints[0];	int npoints = xpts.length;	for (int i=0; i<npoints; ++i) {	    j = (i + 1) % npoints;      	    factor = xpts[i] * ypts[j] - xpts[j] * ypts[i];	    cx += (xpts[i] + xpts[j]) * factor;	    cy += (ypts[i] + ypts[j]) * factor;	}    	A = A * 6.0f;	factor = 1/A;    	// bbenyo: take the absolute value cause I was getting negative values	//         for polys with all positive vertices	cx = Math.abs(cx * factor);	cy = Math.abs(cy * factor);    	Point center = new Point(Math.round(cx), Math.round(cy));	return center;    }