I can see that if points 1 and 2, or 2 and 3, are equal (on top of each other), then dVal will return 0.
Still trying to work out what happens if points 1 and 3 are equal.
If points 1 and 3 are equal, then can substitute point 3 for point 1, at which would make the two factors of the first product the same as the two factors of the second product, BUT NEGATIVE, and two negatives make a positive, and thus the two products will be the same, and subtracting same from same will return 0.
So, somewhat serendipitously, the problem of points on top of each other appears to take care of itself. I think worst case is that if you had only three points and they were all the same, then the returned hull would be those same three points in the same order (not that it matters), with 0 length perimeter enclosing 0 area.
' To find orientation of ordered triplet (p, q, r).
' The function returns following values
' 0 --> p, q and r are collinear
' 1 --> Clockwise
' 2 --> Counterclockwise
Sub Orientation(tLL1 As TMapLatLng, tLL2 As TMapLatLng, tLL3 As TMapLatLng) As Double
Dim dVal As Double = (tLL2.fLat - tLL1.fLat) * (tLL3.fLng - tLL2.fLng) - (tLL2.fLng - tLL1.fLng) * (tLL3.fLat - tLL2.fLat)