6 kyu

Convexity of a polygon

Description
Loading description...
Algorithms
Geometry
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    Initial code is convex :: Num a => [(a,a)] -> Bool, but the kata is not solvable without at least Eq a or Ord a, so the initial code should have that added too.

  • JohanWiltink Avatar

    Test headers seem to imply there's only one test being run. Actually, it's testing the usual 100. I'd mention that in the header; it prevents people ( me, if I hadn't looked into it ) from complaining.

  • rruusu Avatar

    You should add more edge cases to the tests, such as adjacent parallel edges and zero-length edges.

    • JohanWiltink Avatar

      Zero-length edges would merit a mention in the description; they would be somewhat counterintuitive.

      Fixed testing with adjacent parallel edges would be nice though.