private boolean doesIntersectInternal(AbstractLineSegment other) {
		final double d1 = direction(other.getP1(), other.getP2(), this.getP1());
		final double d2 = direction(other.getP1(), other.getP2(), this.getP2());
		final double d3 = direction(this.getP1(), this.getP2(), other.getP1());
		final double d4 = direction(this.getP1(), this.getP2(), other.getP2());

		if (d1 == 0 && isBetween(this.getP1(), other.getP1(), other.getP2())) {
			return true;
		}

		if (d2 == 0 && isBetween(this.getP2(), other.getP1(), other.getP2())) {
			return true;
		}

		if (d3 == 0 && isBetween(other.getP1(), this.getP1(), this.getP2())) {
			return true;
		}

		if (d4 == 0 && isBetween(other.getP2(), this.getP1(), this.getP2())) {
			return true;
		}

		final boolean result = signDiffers(d1, d2) && signDiffers(d3, d4);
		assert this.intersectsLine(other) == result;
		return result;
	}