The task is to check if the sum of angles of the triangle equals 180. After trigonometric calculations and summing the final result most likely there will be a result something like 180.0000000000000000001. Such a tiny bit is enough for the app to say that the triangle is not valid.
What is interesting:
print(summ_int) will give “180” in the console,
but
print(summ_int-180) will reveal this tiny thing as -2.8421709430404e-14 or any other…
At the moment I am using a work-around to get rid of this bit with the following two lines:
summ_int = tostring(summ_int)
summ_int = tonumber(summ_int)
I wonder is there a proper way of doing so?