Suite à la source de Miko500 sur le théorème de pythagore, je met la mienne qui date déjà un peu. Elle permet de calculer tous les éléments d'un tirangle rectangle ou non à partir de 3 éléments.
ATTENTION LES ANGLES SONT EN GRADES
Source / Exemple :
Une petite partie du code, le reste dans le zip
If a = 0 Then
If b <> 0 And C <> 0 Then
a = 200 - (b + C)
Formule_A = "200 - (B + C)"
GoTo suite4
End If
If TriRecB = True Then
If AC <> 0 And AB <> 0 Then
a = Acos(AB / AC)
Formule_A = "Acos[AB/AC]"
GoTo suite4
End If
If AC <> 0 And BC <> 0 Then
a = Asin(BC / AC)
Formule_A = "Asin[BC/AC]"
GoTo suite4
End If
If AB <> 0 And BC <> 0 Then
a = Atn(BC / AB)
Formule_A = "Atan[BC/AB]"
GoTo suite4
End If
End If
If TriRecC = True Then
If AC <> 0 And AB <> 0 Then
a = Acos(AB / AC)
Formule_A = "Acos[AB/AC]"
GoTo suite4
End If
If AC <> 0 And BC <> 0 Then
a = Atn(BC / AC)
Formule_A = "Atan[BC/AC]"
GoTo suite4
End If
If AB <> 0 And BC <> 0 Then
a = Asin(BC / AB)
Formule_A = "Asin[BC/AB]"
GoTo suite4
End If
End If
If AB <> 0 And AC <> 0 And BC <> 0 Then
a = (Acos(((AB * AB) + (AC * AC) - (BC * BC)) / (2 * AB * AC))) * Conver
Formule_A = "Acos[(AB² + AC² - BC²)/(2 x AB x AC)]"
GoTo suite4
End If
If BC <> 0 And AC <> 0 And b <> 0 Then
a = (Asin((BC * Sin(b / Conver)) / AC)) * Conver
Formule_A = "Asin[(BC x sin B)/AC]"
GoTo suite4
End If
If BC <> 0 And AB <> 0 And C <> 0 Then
a = (Asin((BC * Sin(C / Conver)) / AB)) * Conver
Formule_A = "Asin[(BC x sin C)/AB]"
GoTo suite4
End If
If S <> 0 And AB <> 0 And AC <> 0 Then
a = (Asin((2 * S) / (AB * AC))) * Conver
Formule_A = "Asin[(2 x S)/(AB x AC)]"
GoTo suite4
End If
End If
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.