Core Function ASin
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> ASin( <expression> ) </pre> === Description === Calculates the arcsine of a number. === Parameters === ==== expression ==== Any value between -1 and 1 (inclusive). ==...") |
(→Example) |
||
Line 24: | Line 24: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | $x = ASin(0.5) | + | $x = ASin(0.5); |
− | $radToDeg = 180 / @PI | + | $radToDeg = 180 / @PI; |
− | $y = ASin(1) * $radToDeg | + | $y = ASin(1) * $radToDeg; |
− | println( "Value is: $y " ) ;arcsine of 1 returns 90° | + | println( "Value is: $y " ); //arcsine of 1 returns 90° |
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 21:37, 16 November 2011
ASin( <expression> )
Contents |
Description
Calculates the arcsine of a number.
Parameters
expression
Any value between -1 and 1 (inclusive).
Return Value
Returns the trigonometric arcsine of expression. Result is in radians.
Remarks
ASin(x) is mathematically defined only for -1 < x < 1, so ASin tends to return NaN for other values of x.
Example
$x = ASin(0.5); $radToDeg = 180 / @PI; $y = ASin(1) * $radToDeg; println( "Value is: $y " ); //arcsine of 1 returns 90°