LibreOffice 25.2 abi
Trigonomeetriline funktsioon, mis tagastab arvavaldise arkustangensi. Tagastatav väärtus on vahemikus -π/2 kuni +π/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).
Radiaanide teisendamiseks kraadidesse korruta radiaanid 180/pii.
kraadid=(radiaanid*180)/pii
radiaanid=(kraadid*pii)/180
Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.
REM Järgmises näites arvutatakse väärtus täisnurkse kolmnurga korral.
REM nurk Alfa nurga Alfa tangensist:
Sub ExampleAtn
REM ĂĽmardatud pii = 3.14159 on eeldefineeritud konstant
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Sisesta nurga lähiskaateti pikkus: ","Lähis")
d2 = InputBox("Sisesta nurga vastaskaateti pikkus: ","Vastas")
Print "Nurk alfa on"; (atn (d2/d1) * 180 / pii); " kraadi"
End Sub