[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon #26

Merged
merged 17 commits into from
Sep 14, 2020
Prev Previous commit
Next Next commit
cleanup and doc
  • Loading branch information
Cedric Liegeois committed Sep 12, 2020
commit d63b1ec5793e88f396efc22ee91ad3b89cc28367
2 changes: 1 addition & 1 deletion src/Data/Geo/Jord/Polygon.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ selfIntersects ps
(_, pairs) = makePairs' (ps, [])

intersects :: (Spherical a) => (MinorArc a, [MinorArc a]) -> Bool
intersects (ma, mas) = any (\ma' -> isJust (GreatCircle.intersection ma ma')) mas
intersects (ma, mas) = any (isJust . GreatCircle.intersection ma) mas

makePairs' ::
(Spherical a)
Expand Down
3 changes: 2 additions & 1 deletion test/Data/Geo/Jord/GreatCircleSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ spec = do
GreatCircle.projection e ma `shouldBe` (Just e)
describe "side" $ do
it "retuns None if p1 is antipode of p2" $ do
GreatCircle.side ystad helsingborg (Geodetic.antipode helsingborg) `shouldBe` GreatCircle.None
GreatCircle.side ystad helsingborg (Geodetic.antipode helsingborg) `shouldBe`
GreatCircle.None
it "returns None if (p1, p2) are equal" $ do
GreatCircle.side ystad helsingborg helsingborg `shouldBe` GreatCircle.None
it "returns None if p0 is on the great circle" $ do
Expand Down