From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03080101.xhp | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03080101.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03080101.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03080101.xhp b/helpcontent2/source/text/sbasic/shared/03080101.xhp new file mode 100644 index 000000000..4188f8cca --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03080101.xhp @@ -0,0 +1,76 @@ + + + + + + + Atn Function + /text/sbasic/shared/03080101.xhp + + + + +
+ +Atn function + +

Atn Function

+ Trigonometric function that returns the arctangent of a numeric expression. The return value is in the range -Pi/2 to +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). + To convert radians to degrees, multiply radians by 180/pi. + degree=(radian*180)/pi + radian=(degree*pi)/180 + Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant. + + + + + + ' The following example calculates for a right-angled triangle + ' the angle Alpha from the tangent of the angle Alpha: + Sub ExampleAtn + ' rounded Pi = 3.14159 Is a predefined constant + Dim d1 As Double + Dim d2 As Double + d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent") + d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite") + Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees" + End Sub + + +
+ + + +
+ + +
-- cgit v1.2.3