public Point2DInt[] getCornersOfOneSide(LineSegmentInt seg, int sgn) {
		final Point2DInt[] corners = getCorners();
		final double sgn0 = seg.side(corners[0]);
		final double sgn1 = seg.side(corners[1]);
		final double sgn2 = seg.side(corners[2]);
		final double sgn3 = seg.side(corners[3]);
		int nb = 0;
		if (Math.signum(sgn0) == sgn) {
			nb++;
		}
		if (Math.signum(sgn1) == sgn) {
			nb++;
		}
		if (Math.signum(sgn2) == sgn) {
			nb++;
		}
		if (Math.signum(sgn3) == sgn) {
			nb++;
		}
		final Point2DInt[] result = new Point2DInt[nb];
		int i = 0;
		if (Math.signum(sgn0) == sgn) {
			result[i++] = corners[0];
		}
		if (Math.signum(sgn1) == sgn) {
			result[i++] = corners[1];
		}
		if (Math.signum(sgn2) == sgn) {
			result[i++] = corners[2];
		}
		if (Math.signum(sgn3) == sgn) {
			result[i++] = corners[3];
		}
		assert nb == i;
		return result;
	}