I am using c# and have a geofence. I have a starting point lat and long and a end point lat and long. I want to detect if at any point the line that would be between the lat and long would intersect or goes "through" a geofence.
I looked at the Ray Casting algorithm but I'm not sure how to implement it in this use case.