Created more flexible version of distance formula.
Merge branch 'master' of https://github.com/darpell/munica.git