JavaScript Math atan2 方法


JavaScript Math atan2 方法

<html>

   <head>
      <title>JavaScript Math atan2() Method</title>
   </head>

   <body>

      <script type = "text/javascript">
         var value = Math.atan2(90,15);
         document.write("First Test Value : " + value );

         var value = Math.atan2(15,90);
         document.write("<br />Second Test Value : " + value );

         var value = Math.atan2(0, -0);
         document.write("<br />Third Test Value : " + value );

         var value = Math.atan2(+Infinity, -Infinity);
         document.write("<br />Fourth Test Value : " + value );
      </script>

   </body>
</html>