Core Function ASin

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> ASin( <expression> ) </pre> === Description === Calculates the arcsine of a number. === Parameters === ==== expression ==== Any value between -1 and 1 (inclusive). ==...")
 
m (1 revision)
 
(2 intermediate revisions by one user not shown)
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]]

Latest revision as of 12:38, 14 June 2015

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°
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox