Returns the arccosine (in radians) of a number.
acos(x)
x A number
The acos method returns a numeric value between 0 and pi radians. If the value of number is outside this range, it returns NaN.
The following function returns the arccosine of 1:
acos(1)
If you pass -1 to acos, it returns 3.141592653589793; if you pass 2, it returns NaN because 2 is out of range
Returns the arcsine (in radians) of a number.
asin(x)
x A number
The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of number is outside this range, it returns NaN.
The following function returns the arcsine of 1:
asin(1)
If you pass asin the value 1, it returns 1.570796326794897 (pi/2); if you pass it the value 2, it returns NaN because 2 is out of range.
Returns the arctangent (in radians) of a number.
atan(x)
x A number
The atan method returns a numeric value between -pi/2 and pi/2 radians.
The following function returns the arctangent of 1:
atan(1)
If you pass atan the value 1, it returns 0.7853981633974483; if you pass it the value .5, it returns 0.4636476090008061.
Returns the cosine of a number.
cos(x)
x A number
The cos method returns a numeric value between -1 and 1, which represents the cosine of the angle.
The following function returns the cosine of 1:
cos(1)
Returns the arcsine (in radians) of a number.
asin(x)
x A number
The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of number is outside this range, it returns NaN.
The following function returns the arcsine of 1:
asin(1)
If you pass asin the value 1, it returns 1.570796326794897 (pi/2); if you pass it the value 2, it returns NaN because 2 is out of range.
Returns the arcsine (in radians) of a number.
asin(x)
x A number
The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of number is outside this range, it returns NaN.
The following function returns the arcsine of 1:
asin(1)
If you pass asin the value 1, it returns 1.570796326794897 (pi/2); if you pass it the value 2, it returns NaN because 2 is out of range.