Why is this if statement does not work?
3 Ansichten (letzte 30 Tage)
if (oval1x ~= sObjVal1(1) || oval1x ~= sObjVal1(end))
it happened that oval1x=4.2139; and sObjVal1(1)=4.2139; but the loop did not work correctly
Edit: is there a way to correct this issue?
madhan ravi am 20 Feb. 2020
Bearbeitet: madhan ravi am 20 Feb. 2020
Because they are float numbers, reading the below links might help you better about floating numbers:
You could add tolerance to satisfy the conditions , search inside the forum with the tag "floating point" you would find lots of explanations about it.