Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: C ++のatanとatan2の違いは何ですか?
なぜ−π <atan2(y、x)≤πなのに、行の場合、実際には0からπまでしか必要とせず、atan2のようなapiがありますが、0からpiに戻るのはなぜですか?
atan2線を描くためだけに使用されるわけではないため、可能なすべての角度を返します。違いが重要な実際の数学にも使用されます。 atan一方、[-pi / 2、+ pi/2]の結果が生成されます。
atan2
atan
の一般的なアプリケーションの1つatan2は、デカルト座標から極座標への変換です。そして、それがすべての角度をサポートすることは、その存在の理由です。それ以外の場合は、を使用できますatan(y/x)。
atan(y/x)