ASin
PowerScript function
Description
Calculates the arcsine of an angle.
Syntax
1 |
ASin ( n ) |
Argument |
Description |
---|---|
n |
The ratio of the lengths of two sides of a triangle |
Return value
Double. Returns the arcsine of n.
Examples
This statement returns .999998 (rounded to six places):
1 |
ASin(.84147) |
This statement returns .520311 (rounded to six places):
1 |
ASin(LogTen (Pi (1))) |
This statement returns 0:
1 |
ASin(0) |
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:
1 2 3 4 5 6 7 8 |
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
ASin method for DataWindows in the section called “ASin” in DataWindow Reference.
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest