Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Approved
C translation (author gone)
Approved
approved
COBOL translation (author inactive).
This only checks the sides. What about, for example, a point at x = 0.9, y = 0.9 ? It's clearly outside the circle, but your code returns true.
This comment is hidden because it contains spoiler information about the solution
Ok, I added the 4 axis points to the fixed/basic tests of the current languages.
TypeScript translation
My vote is yes, but with only those 4 coordinates I suggested. About the other random tests, ideally, they should fall 50% inside and 50% outside.
So should we add border tests? General tests with random
x
and the correspondingy
on the border are really bad because they are likely to give wrong results. There are some test values which I consider "safe" (pythagorean triplets) as the standard approaches give the correct result.Just out of curiousity, would you have given it 6 or 8?
This kata is 4 years old so no chance to change that.
This is a bad answer, as demonstrated by Chrono79.
Loading more items...