the problem is hard to explain, but...
to always be able to determining if a triangle is equilateral requires infinite precision because its a euclidean definition, and computers cannot do that.
this general misunderstanding produces a lot of bugs in code.
understanding why this is, is a fundamental principle see; https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
in the example the test input coordinates have limited precision so it can work, but it gives people a false idea, that it will always work, its a incorrect concept that teaching examples shouldn't be re-enforcing.
the problem is hard to explain, but...
to always be able to determining if a triangle is equilateral requires infinite precision because its a euclidean definition, and computers cannot do that.
this general misunderstanding produces a lot of bugs in code.
understanding why this is, is a fundamental principle see; https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
in the example the test input coordinates have limited precision so it can work, but it gives people a false idea, that it will always work, its a incorrect concept that teaching examples shouldn't be re-enforcing.