Help Center›FreeBASIC
Asinfunction
Finds the arcsine of a number
Syntax
Declare Function Asin ( ByVal number As Double ) As Double
Parameters
| Name | Description | |
|---|---|---|
number | Sine value in the range [-1..1]. |
Return value
The arcsine of
number, in radians, in the range [-Pi/2..Pi/2].Description
Asin returns the arcsine of the argument number as a Double within the range of -Pi/2 to Pi/2. The arcsine is the inverse of the Sin function. The returned angle is measured in radians (not degrees).Asin can be overloaded as operator to accept user-defined types.Remarks
Usage
result = Asin( number )
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias
__Asin.
Differences from QB
- New to FreeBASIC
See also
Example
Dim h As Double
Dim o As Double
Input "Please enter the length of the hypotenuse of a triangle: ", h
Input "Please enter the length of the opposite side of the triangle: ", o
Print ""
Print "The angle between the sides is"; Asin ( o / h )
Sleep
The output would look like:
Please enter the length of the hypotenuse of a triangle: 5 Please enter the length of the opposite side of the triangle: 3 The angle between the sides is 0.6435011087932844
Reference
- Documented in KeyPgAsin.html