A 2D implementation of the GJK distance algorithm.