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.
Reference solution used for random tests is clearly incorrect:
At
a = 415339.9863145371
pointing 88 degrees clockwise andb = 459659.20499247574
pointing ~172.43 degrees counter-clockwise, the third side equalsc = 666405.0066220658
and the bounding square is around471795.42395730014
, smaller than479755.37244198116
.One fixed test case is
TriangleFitsInSquare(120.378, 340.873, 220.494, 600.698)
, which violates the triangle equality (and expectstrue
for some reasons).There are also cases like
TriangleFitsInSquare(101.419, 184.952, 83.533, 454.56)
which is a triangle with 0 area.