asin()  Math  class method JS Home  <<  JS Reference  <<  Math  <<  asin()

Description

Returns the arcsine of a number in radians between -PI/2 and PI/2.

  • Radians to Degrees - divide number by (Math.PI / 180).
  • Degrees to Radians - multiply number by (Math.PI * 180).
  • Like all class methods asin() should be used on the class rather than an instance of the class.

Syntax

Signature Description
Math.asin(value)Returns the arcsine of a number in radians between -PI/2 and PI/2.

Parameters

Parameter Description
valueThe value you wish to find the arcsine in radians for:
  • A number in the range -1 to 1.
  • Values outside this range return NaN.

Examples

The code below displays asin() usage.


// Store results in an array.
var asinValues = new Array(5);

asinValues[0] = Math.asin(-1);
asinValues[1] = Math.asin(0);
asinValues[2] = Math.asin(0.75);
asinValues[3] = Math.asin(-2);
asinValues[4] = Math.asin('a string');
asinValues[5] = Math.asin();

alert(asinValues);  

Press the button below to action the above code:

Related Tutorials

JavaScript Advanced Tutorials - Lesson 4 - Math

JavaScript Basics

JavaScript Basics

JavaScript Intermediate

JavaScript Intermediate

JavaScript Advanced

JavaScript Advanced

JavaScript Reference

JavaScript Entities

Globals

Math

Class Properties
E
LN2
LN10
LOG2E
LOG10E
PI
SQRT1_2
SQRT2
Instance Properties
None.
Class Methods
abs()
acos()
asin()
atan()
atan2()
ceil()
cos()
exp()
floor()
log()
max()
min()
pow()
random()
round()
sin()
sqrt()
tan()
Instance Methods Getters
None.
Instance Methods Setters
None.

Statements

Operators