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 491404 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java (+11 lines)
Lines 321-326 Link Here
321
		return getP1().getDistance(getP2());
321
		return getP1().getDistance(getP2());
322
	}
322
	}
323
323
324
	/**
325
	 * Returns the {@link Point} representing the mid-point of this {@link Line}
326
	 *
327
	 * @return the mid-point of this {@link Line}
328
	 */
329
	public Point getMidPoint() {
330
		Point p1 = getP1();
331
		Point p2 = getP2();
332
		return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
333
	}
334
324
	// TODO: add specialized getOverlap()
335
	// TODO: add specialized getOverlap()
325
336
326
	/**
337
	/**

Return to bug 491404