0
Where's the mistake ?
Why the angles are wrong calculated in my func of checking a triangle ? https://code.sololearn.com/cycUAE1fgFPK/?ref=app
3 odpowiedzi
+ 2
im not sure about the exact error but to get the angles you can use the cosine theorem:
c^2 = a^2+b^2-2ab cos(phi)
If you throw that around and solve for phi you get the angle described by the two sides a and b.
For the other angles rotate a, b and c in the above formula.
0
Instead of comparing the difference of rations with 0.01 I do it with 1 now and it seems working...Is it good ?)
0
Something is wrong when sides are too small. Try bigger