Function Reference


ASin

Calculates the arcsine of a number.

ASin ( expression )

Parameters

expression Any value between -1 and 1 (inclusive).

Return Value

Returns the trigonometric arcsine of the number. Result is in radians.

Remarks

ASin(x) is mathematically defined only for -1 < x < 1, so ASin() tends to return -1.#IND for other values of x.

Related

ACos, ATan, Cos, Sin, Tan

Example

Example 1

#include <MsgBoxConstants.au3>

Example()

Func Example()
        ; Assign a Local variable the arcSine of 0.5.
        Local $fArcSin1 = ASin(0.5)

        ; Display the result.
        MsgBox($MB_SYSTEMMODAL, "", $fArcSin1 & " rad.")

        ; Assign a Local constant variable the approximate PI number.
        Local Const $PI = 3.141592653589793

        ; Assign a Local variable the formula to switch from radian to degree (equals to one radian in degree).
        Local $fRadToDeg = 180 / $PI

        ; Assign a Local variable a number in degree.
        Local $fArcSin2 = $fRadToDeg * ASin(1)

        ; Display the result.
        MsgBox($MB_SYSTEMMODAL, "", $fArcSin2 & " deg.")
EndFunc   ;==>Example

Example 2

; Example of using ASin with degrees
#include <Math.au3>
#include <MsgBoxConstants.au3>

Local $fDegree = _Degree(ASin(0.5))

MsgBox($MB_SYSTEMMODAL, Default, "ASin(0.5) = " & $fDegree & " degrees")