Beta
Laser Archery
Loading description...
Mathematics
Linear Algebra
Algorithms
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.
In the "Really close to target" test case I think the arrow hits inside r2 but outside r1, which is weird since r2 is supposed to be smaller than r1 (r1=1.0 r2=4.0). The reference seems to just give 0 points if it hits outside r1, even if it is inside r2.. But I suppose the test should be changed so that r2 < r1. Nice kata by the way!
What is 'right'? What if it is on the intersection of
50
,10
and30
?Since the behaviour is actually not tested. And different order of calculation will lead to different floating error.
So you'd better change it to
It is guaranteed arrows wont strike on border of sectors
i mostly put that there because i had no guarantee that the random test wouldn't end up placing an arrow on a border. i guess one in several trillion is kind of unlikely, though.