ASin

Description

Calculates the arcsine of an angle.

Syntax

ASin ( n )

Argument

Description

n

The ratio of the lengths of two sides of a triangle for which you want a corresponding angle (in radians). The ratio must be a value between -1 and 1.

Returns

Double. Returns the arcsine of n.

Examples

Example 1

This statement returns .999998 (rounded to six places):

ASin(.84147)

Example 2

This statement returns .520311 (rounded to six places):

ASin(LogTen (Pi (1)))

Example 3

This statement returns 0:

ASin(0)

Example 4

This code in the Clicked event of a button catches a runtime error that occurs when an arcsine is taken for a user-entered value—passed in a variable—that is outside of the permitted range:

Double ld_num

ld_num = Double (sle_1.text)


TRY

sle_2.text = string (asin (ld_num))

CATCH (runtimeerror er)

	MessageBox("Runtime Error", er.getmessage())

END TRY

See also