Source: https://homepages.wmich.edu/~cho/ME432/Appendix1Udated_metric.pdf