使用golang / geo / s2查找给定区域中是否存在latlng

I am trying to find if a given LatLng exists in a Desired area. I am using github.com/golang/geo/s2.

rect := s2.RectFromLatLng(s2.LatLng{0.0, 0.0})
rect = rect.AddPoint(s2.LatLng{2.0, 2.0})
isThere := rect.ContainsLatLng(s2.LatLng{1.0, 1.0})
fmt.Printf("%+v", rect.Hi())
fmt.Printf("%+v", rect.Lo())
println(isThere)

I'm expecting it to return true but it gives false. Also, rect.Hi() and rect.Lo() are same.

Could someone help me understand it better, what I am doing wrong?

Thanks

s2.LatLng creates a point based on radian and not in degree, you should try using s2.LatLngFromDegrees() API.