Where's the mistake ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

1st Nov 2018, 6:11 PM
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ - avatar
3 Answers
+ 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.
1st Nov 2018, 8:01 PM
Leif
Leif - avatar
0
Instead of comparing the difference of rations with 0.01 I do it with 1 now and it seems working...Is it good ?)
1st Nov 2018, 6:40 PM
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ - avatar
0
Something is wrong when sides are too small. Try bigger
1st Nov 2018, 6:48 PM
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ
ะะปะตะบัะตะน ะ’ะฐัะธะปัŒะตะฒ - avatar