Your test suite just checks whether a quadrilateral has equal sides, but that's not enough to form a square: rhombuses also have equal sides. Therefore, the test suite should also check a solution's angles.
PS: A test case filled with rhombuses and a single square on the curve would be instructional too.
Back to basics 11 - Max Integer
678 Solvers
Return the first and last characters of a character array
3464 Solvers
Put two time series onto the same time basis
174 Solvers
Map all the indices of an Array Indices into a Vector giving Index vs Row and Column
25 Solvers
348 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!