Guida di LibreOffice 7.3
Funzione trigonometrica che restituisce l'arcotangente di un'espressione numerica. Il valore restituito è compreso tra -Pi/2 e +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).
Per convertire i radianti in gradi, moltiplicate i radianti per 180/pi.
grado=(radiante*180)/pi
radiante=(grado*pi)/180
Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.
' L'esempio seguente calcola, per un triangolo retto
' l'angolo Alfa dalla tangente dell'angolo Alfa:
Sub ExampleAtn
' Pi arrotondato = 3,14159 è una costante predefinita
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Inserite la lunghezza del lato adiacente l'angolo: ","Adiacente")
d2 = InputBox("Inserite la lunghezza del lato opposto all'angolo: ","Opposto")
Print "L'angolo Alfa è"; (atn (d2/d1) * 180 / Pi); " gradi"
End Sub