public Optional<Distance> horizontalDistAtVerticalClosureTime(Instant time) {
        Optional<Duration> timeUntilClosure = timeUntilVerticalClosure(time);

        //not closing in the vertical direction
        if (!timeUntilClosure.isPresent()) {
            return Optional.empty();
        }

        Speed closureRate = horizontalClosureRateAt(time);
        Distance startingSeparation = horizontalSeparationAt(time);
        Distance distanceClosed = closureRate.times(timeUntilClosure.get());

        return Optional.of(startingSeparation.minus(distanceClosed).abs());
    }
@Test
    public void testHorizontalDistAtVerticalClosureTime() {

        //decreasing vertical separation...
        Distance[] verticalDistances = new Distance[]{
            Distance.ofFeet(200),
            Distance.ofFeet(100),
            Distance.ofFeet(50)
        };

        //increasing horizontal separation...
        Distance[] horizontalDistances = new Distance[]{
            Distance.ofNauticalMiles(2),
            Distance.ofNauticalMiles(3),
            Distance.ofNauticalMiles(5)
        };

        SeparationTimeSeries instance = new SeparationTimeSeries(
            times(),
            verticalDistances,
            horizontalDistances
        );

        assertEquals(
            Distance.ofNauticalMiles(2 + 2), //2 NM + 2 NM in new "closure"
            instance.horizontalDistAtVerticalClosureTime(EPOCH.plusSeconds(0)).get()
        );
        assertEquals(
            Distance.ofNauticalMiles(2.2 + 1.8), //2.2 NM + 1.8 NM in new "closure"
            instance.horizontalDistAtVerticalClosureTime(EPOCH.plusSeconds(1)).get()
        );
        assertEquals(
            Distance.ofNauticalMiles(3 + 4), //3 NM ft + 10 seconds @ 2 NM every 5 sec
            instance.horizontalDistAtVerticalClosureTime(EPOCH.plusSeconds(5)).get()
        );
        assertEquals(
            Distance.ofNauticalMiles(3.8 + 3.2), //3.8 NM + 8 seconds @ 2 NM every 5 sec
            instance.horizontalDistAtVerticalClosureTime(EPOCH.plusSeconds(7)).get()
        );
        assertEquals(
            Distance.ofNauticalMiles(5 + 2), //5 NM + 5 seconds @ 2 NM every 5 sec
            instance.horizontalDistAtVerticalClosureTime(EPOCH.plusSeconds(10)).get()
        );
    }