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.
C tests have test harness warning:
fixture.c:11:52: warning: implicitly declaring library function 'sqrt' with type 'double (double)' [-Wimplicit-function-declaration]
cr_assert_eq(IsCollision(-5, 5, 5.0001, 5, -5, 5*sqrt(5)), true, "Expected true.");
^
fixture.c:11:52: note: include the header <math.h> or explicitly provide a declaration for 'sqrt'
1 warning generated.
How are you disabling Math.log etc? I need the same thing for some other kata ideas.
condition is not correct. meaning touching or crossing. the condition says only about touch
colliding
it is likely to be interpreted astouching
by some users. Why not use the more specific and mathematically correct termintersecting
?The intersection can be one or more points, it covers any scenario, from touching to full overlapping.
C# random tests are not guaranteed to fail this qwerty solution and this almost identical one.
Description is a bit iffy.
It took me some time to understand that with 'collision' was really meant 'touching/colliding OR overlapping'. It's not the same, imho.
Maybe it's just me. No one else seems to have a problem with that.
Added bash translation:
bash translation
please review
nice simple geometry kata. I like it.
seems to be approved
You should mark it as a suggestion to improve visibility.
COBOL translation, please review carefully.
Added bash translation:
https://www.codewars.com/kumite/616e9898dc436f003fbbff6f?sel=616e9898dc436f003fbbff6f
This is a good idea for a series of Kata, from simplest - collision of two circles, to hardest - general collision of two arbitrarily shaped bodies in 3d.
They're equivalent in the mathematical sense, but not in the floating-point sense. This is a permanent problem with floating point numbers.
for example, if
(r1 + r2)
is really small, the precision of its product(r1 + r2) * (r1 + r2)
is going to be bad ... so it's better to avoid multiplications if you can in a formula like this(i didnt look at the JS translation so it's just my guess)
Loading more items...