Javascript
 Computer >> コンピューター >  >> プログラミング >> Javascript

JavaScriptのMath.asin()関数


Mathオブジェクトのasin()関数は数値を受け取り、そのアークサイン値をラジアンで返します。結果の値を度に変換するには、180を掛けて、結果を3.14159(円周率の値)で割ります。

構文

その構文は次のとおりです

Math.asin(0.5)

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.asin(0.5);
      document.write("arcsine value: "+result);
      document.write("<br>");
      document.write("arcsine value in degrees: "+result*180/Math.PI);
   </script>
</body>
</html>

出力

arcsine value: 0.5235987755982989
arcsine value in degrees: 30.000000000000004

  1. JavaScriptのMath.tanh()関数

    Mathオブジェクトのtanh()関数は、角度(ラジアン)を受け入れ、その双曲線正接値を返します。 構文 その構文は次のとおりです Math.tanh(90) 例 <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">       var result = Math.tanh(

  2. JavaScriptのMath.tan()関数

    Mathオブジェクトのtan()関数は、角度(ラジアン)を受け入れ、そのタンジェント値を返します。 構文 その構文は次のとおりです Math.tan(90) 例 <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">       var result = Math.tan(90