Aide LibreOffice 7.3
Fonction trigonométrique renvoyant l'arc tangente d'une expression numérique. La valeur de retour est comprise entre -Pi/2 et +Pi/2.
The arctangent is the inverse of the tangent function. The Atn Function returns the angle "Alpha", expressed in radians, using the tangent of this angle. The function can also return the angle "Alpha" by comparing the ratio of the length of the side that is opposite of the angle to the length of the side that is adjacent to the angle in a right-angled triangle.
Atn(side opposite the angle/side adjacent to angle)= Alpha
Atn (Number As Double) As Double
Double
Number: Any numerical expression that represents the ratio of two sides of a right triangle. The Atn function returns the corresponding angle in radians (arctangent).
Pour convertir des radians en degrés, multipliez les radians par 180/pi.
degrés=(radians*180)/pi
radians=(degrés*pi)/180
Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.
' L'exemple suivant renvoie, pour un triangle rectangle,
' l'angle Alpha calculé à partir de la tangente de cet angle :
Sub ExampleAtn
' Pi arrondi = 3,14159 est une constante prédéfinie
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Saisissez la longueur du côté adjacent à l'angle : ","Adjacent")
d2 = InputBox("Saisissez la longueur du côté opposé à l'angle : ","Opposé")
Print "L'angle alpha est"; (atn (d2/d1) * 180 / Pi); " degrés"
End Sub