Updated function documentation, refactored example solution
Switched to Euclidian distance calculation
Merge pull request #4 from acirtautas/master

Updated PHP solution