Community
Participate
Working Groups
import org.eclipse.gef4.geometry.euclidean.Angle;
import org.eclipse.gef4.geometry.euclidean.Straight;
/**
* Returns the angle from the start {@link Point} to the end {@link Point}
* of this {@link Line}
*
* @return the angle from the start {@link Point} to the end {@link Point}
*/
public Angle getDirection() {
Point start = getP1();
Point end = getP2();
return Angle.fromRad(Math.atan2(end.y - start.y, end.x - start.y));
}
* Returns the single intersection point between this {@link Line} and the