i have a function that is going calculating the distance between two locations using the latitude and longitudes for two points assuming the earth is flat and the lat and long are perpendicular. I called that function distance. My issue in moving forward is taking the distance i am given from this the function distance and bringing it into another function i call function wp. I would like to say if the distance is less than 300 then calculate this formula or if it is less than 500 calculate another. I am having issues with my second function calling the distance value.
Any help would be great
Any help would be great