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

Collapse All | Expand All

(-)a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java (+14 lines)
Lines 18-19 Link Here
18
18
19
import org.eclipse.gef4.geometry.euclidean.Angle;
19
import org.eclipse.gef4.geometry.euclidean.Straight;
20
import org.eclipse.gef4.geometry.euclidean.Straight;
Lines 179-180 Link Here
179
	/**
180
	/**
181
	 * Returns the angle from the start {@link Point} to the end {@link Point}
182
	 * of this {@link Line}
183
	 * 
184
	 * @return the angle from the start {@link Point} to the end {@link Point}
185
	 *         of this {@link Line}
186
	 */
187
	public Angle getDirection() {
188
		Point start = getP1();
189
		Point end = getP2();
190
		return Angle.fromRad(Math.atan2(end.y - start.y, end.x - start.y));
191
	}
192
193
	/**
180
	 * Returns the single intersection point between this {@link Line} and the
194
	 * Returns the single intersection point between this {@link Line} and the

Return to bug 460754