A general and practical method for calculating cosmological distances | Synapse