RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.ArcTan2 Function

Calculates the arctangent angle and quadrant of a given number.

Pascal
function ArcTan2(const Y: Extended; const X: Extended): Extended;
C++
Extended ArcTan2(const Extended Y, const Extended X);

ArcTan2 calculates ArcTan(Y/X), and returns an angle in the correct quadrant. The values of X and Y must be between –2^64 and 2^64. In addition, the value of X can't be 0. The return value will fall in the range from -Pi to Pi radians. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!