public Point2D getSegIntersection(AbstractLineSegment other) {
		final double u;
		if (other.isVertical()) {
			u = getIntersectionVertical(other.getP1().getX());
		} else if (other.isHorizontal()) {
			u = getIntersectionHorizontal(other.getP1().getY());
		} else {
			throw new UnsupportedOperationException();
		}
		if (java.lang.Double.isNaN(u) || u < 0 || u > 1) {
			return null;
		}
		final Point2D.Double result = getPoint2D(u);
		if (isBetween(result, other.getP1(), other.getP2())) {
			return result;
		}
		return null;
	}