Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 384059
Collapse All | Expand All

(-)a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Point.java (-4 / +4 lines)
Lines 92-102 public class Point implements Cloneable, Serializable { Link Here
92
		}
92
		}
93
93
94
		// closing segment
94
		// closing segment
95
		a = points[points.length - 2].x * points[points.length - 1].y
95
		a = points[points.length - 1].x * points[0].y
96
				- points[points.length - 2].y * points[points.length - 1].x;
96
				- points[points.length - 1].y * points[0].x;
97
		sa += a;
97
		sa += a;
98
		cx += (points[points.length - 2].x + points[points.length - 1].x) * a;
98
		cx += (points[points.length - 1].x + points[0].x) * a;
99
		cy += (points[points.length - 2].x + points[points.length - 1].x) * a;
99
		cy += (points[points.length - 1].y + points[0].y) * a;
100
100
101
		return new Point(cx / (3 * sa), cy / (3 * sa));
101
		return new Point(cx / (3 * sa), cy / (3 * sa));
102
	}
102
	}

Return to bug 384059