Math.atan2
X,Y座標の角度を得る
構文
Math.atan2(x,y)
引数
x=X座標, y=Y座標例文
<html> <head> <title>Math.atan2</title> </head> <body> <!--X,Y座標の角度を得るのサンプル--> <script type="text/javascript"> document.write(Math.atan2(0.50,0.50)+"<br>"); document.write(Math.atan2(-0.50,-0.50)+"<br>"); document.write(Math.atan2(5,5)+"<br>"); document.write(Math.atan2(10,20)+"<br>"); document.write(Math.atan2(-5,-5)+"<br>"); document.write(Math.atan2(-10,10)); </script> </body> </html>
関連記事
- Math.tan
- Math.sqrt
- Math.sin
- Math.round
- Math.random
- Math.pow
- Math.min
- Math.max
- Math.log
- Math.floor
- Math.exp
- Math.cos
- Math.ceil
- Math.atan
- Math.asin
- Math.acos
- Math.abs
- Math.SQRT2
- Math.SQRT1_2
- Math.PI
- Math.LOG2E
- Math.LOG10E
- Math.LN2
- Math.LN10
- Math.E
スポンサーリンク