Need help to fix a bug [closed]
hi all,
i am trying to fix a bug on minEnclosingTriangle.
I changed min_enclosing_triangle.cpp line 730 as
bool sideCValid = (validationFlag == VALIDATION_SIDES_FLUSH) || (isPointOnLineSegment(midpointSideC, sideCStartVertex, sideCEndVertex));
to test result of this change i compare return values of both current and changed minEnclosingTriangle by bugtest_minEnclosingTriangle.cpp
can someone help me by running bugtest_minEnclosingTriangle.cpp
1) i am working with code:block and wonder results of other compiler.
2) i have a problem when running bugtest_minEnclosingTriangle.cpp. at last test points my changed code fails. but when i make this change to source of the library and rebuild it works good ( i think i must do something related configuration of my compiler )
attached pictures about results :
1 both successful
2 my change is successful
3 my change is failed
thanks in advance
Tested with VS 2013 - everything fine, including last group of test points (your change works without a problem in both Debug and Release modes).
@LorenaGdL thank you. there is another test in mainB could you try it please. (renaming main to mainA, mainB to main)
and about first test is there any difference to my results like
@sturkmen: first test show same results as yours (except from above said, last group of points are successfully enclosed by your function). In first test, cv function does well only in first and last groups, your function does well in all groups. Second test (sorry, I missed it before) the results show that your function does equally or better (same or less triangle area), but also show some groups of points that can't be enclosed either with cv function or your function. Let me know if you need some numbers or screenshots. Btw, I run mainB with different RNG seeds.
@LorenaGdL you did greate and explained well.thank you very much.
@LorenaGdL thanks again. now it is fixed!