Calculating distance between two Points – GPS

It's a crazy long algorithm, but it works…in C#:  A and B are point classes.

Math.Cos(Math.Sin((A.Latitude * Math.PI / 180)) * Math.Sin((B.Latitude * Math.PI / 180)) + Math.Cos((A.Latitude * Math.PI / 180)) * Math.Cos((B.Latitude * Math.PI / 180)) * Math.Cos(((A.Longitude – B.Longitude) * Math.PI / 180)))) * 180 / Math.PI) * 60 * 1.1515)

I use it in my platform when determining closest user and if a person is at an event.

Chris