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.
Nice!
I'd rather make the casting explicit, but I come from another programming world...
it is so good!
Problem is with user code, not the kata, then. Closing.
Tried this but dishes out compiler error. I don't know but it's best to convert size_t to int first.
I did exactly the same thing lol.
Genius
čestitke!
The C random tests indeed include negative radii, this should be fixed, or the description should be changed.
juraj.fabo, you are right, this is not correct.
Try using the absolute value of the radius. Mathematically, a negative radius would correspond to every angle theta resulting in (-r * cos(theta), -r * sin(theta)). As a circle is perfectly round, the shape is constant: a circle of radius r is the same as a circle of radius -r.
The test cases for C# do include negative radii, which is why my solution fails.
I was doing the kata in C.
The test cases shouldn't include negative radii, as I agree they don't make much sense. Which language are you attempting the kata in? One of the language translations might be flawed.
How do you want us to handle the case of r1 or r2 being negative? Strictly speaking a circle with a negative radius doesn't exist.
Loading more items...