()
| 56 | } |
| 57 | |
| 58 | func ExampleAreaFromSteradians() { |
| 59 | bermuda := s2.PointFromLatLng(s2.LatLngFromDegrees(32.361457, -64.663495)) |
| 60 | culebra := s2.PointFromLatLng(s2.LatLngFromDegrees(18.311199, -65.300765)) |
| 61 | miami := s2.PointFromLatLng(s2.LatLngFromDegrees(25.802018, -80.269892)) |
| 62 | triangle := s2.PolygonFromLoops( |
| 63 | []*s2.Loop{s2.LoopFromPoints([]s2.Point{bermuda, miami, culebra})}) |
| 64 | area := earth.AreaFromSteradians(triangle.Area()) |
| 65 | fmt.Printf("Bermuda Triangle is %.2f square miles", area.SquareMiles()) |
| 66 | // Output: Bermuda Triangle is 464541.15 square miles |
| 67 | } |
| 68 | |
| 69 | func ExampleSteradiansFromArea() { |
| 70 | steradians := earth.SteradiansFromArea(unit.SquareCentimeter) |
nothing calls this directly
no test coverage detected
searching dependent graphs…