Beta
Circle
Loading description...
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.
Please, explain clearly what you mean by "a chord diving a circle into two parts" and "center angle of the chord". From what I could understand, we have something similar to the plot in the image below where the angle between
AB
andOC
can always be 90 degrees regardless of the1 / X
ratio, and I don't think that is the thing that you're implying.The drawing looks correct, the angle in question is AOB, which matches the second sample test. I'm not sure about the proper terms, "cental angle" seems to be more common, but there are many results for "center angle".
I agree that it was quite difficult to understand. It only really made sense to me once I looked up chords in circles on wikipedia. Other that, I like the approach of this kata, to not force me to use a specific algorithm, but instead throw this equation at me and let me decide how I want to solve it.
Resolved. Added sample explanation. Also fixed a typo.
Thanks for your contribution!
3,000,000 tests for 1,000 inputs? Seriously?
Ah,
X
is not limited to integers, so there's more than 1000 possible inputs. Although, I don't see the point in testing those considering the same formula should work both for integral and non-integralX
.I think there's no analytical solution, so these are performance tests. I haven't solved it yet thought, so I'm not sure.
That's it.