Merge pull request #1 from kindkid/master

Do it in javascript
defined functions and they work
created the distance formula