Reply To: Haversine Formula in Max – Troublesome.

Forums > Javascript > Haversine Formula in Max – Troublesome.
Mar 05 2014 | 7:05 pm

Your lat1/lat2/lon1/lon2 variables are local to their functions, so other functions don’t know about them. You could declare them at the top of your code and then set them in your bang function, or you could get rid of these functions altogether and use declareattribute(). You can read more about declareattribute() here:


Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required