Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    colliding it is likely to be interpreted as touching by some users. Why not use the more specific and mathematically correct term intersecting?
    The intersection can be one or more points, it covers any scenario, from touching to full overlapping.

  • Custom User Avatar

    C# random tests are not guaranteed to fail this qwerty solution and this almost identical one.