JavaScript asin() ·½·¨
¶¨ÒåºÍÓ÷¨
asin() ·½·¨¿É·µ»ØÒ»¸öÊýµÄ·´ÕýÏÒÖµ¡£
Óï·¨
Math.asin(x)
²ÎÊý | ÃèÊö |
---|---|
x | ±ØÐè¡£±ØÐëÊÇÒ»¸öÊýÖµ£¬¸ÃÖµ½éÓÚ -1.0 ~ 1.0 Ö®¼ä¡£ |
·µ»ØÖµ
x µÄ·´ÕýÏÒÖµ¡£·µ»ØµÄÖµÊÇ -PI/2 µ½ PI/2 Ö®¼äµÄ»¡¶ÈÖµ¡£
ÌáʾºÍ×¢ÊÍ
×¢ÊÍ£ºÈç¹û²ÎÊý x ³¬¹ýÁË -1.0 ~ 1.0 µÄ·¶Î§£¬ÄÇôä¯ÀÀÆ÷½«·µ»Ø NaN¡£
×¢ÊÍ£ºÈç¹û²ÎÊý x ȡֵ 1£¬ÄÇô½«·µ»Ø PI/2¡£
ʵÀý
ÔÚ±¾ÀýÖУ¬ÎÒÃǽ«È¡µÃ²»Í¬Êý×ֵķ´ÕýÏÒÖµ£º
<script type="text/javascript"> document.write(Math.asin(0.64) + "<br />") document.write(Math.asin(0) + "<br />") document.write(Math.asin(-1) + "<br />") document.write(Math.asin(1) + "<br />") document.write(Math.asin(2)) </script>
Êä³ö£º
0.6944982656265559 0 -1.5707963267948965 1.5707963267948965 NaN
TIY
- asin()
- ÈçºÎʹÓà asin() À´È¡µÃ²»Í¬Êý×ֵķ´ÕýÏÒÖµ¡£