6 kyu
Convexity of a polygon
Loading description...
Algorithms
Geometry
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Initial code is
convex :: Num a => [(a,a)] -> Bool
, but the kata is not solvable without at leastEq a
orOrd a
, so the initial code should have that added too.Looks like it's already fixed
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.
You should add more edge cases to the tests, such as adjacent parallel edges and zero-length edges.
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.