Returns the nearest approach distance between the temporal number and the temporal box (internal function)