Simplified torus distance.