System.Types.TPoint.Angle
Delphi
function Angle(const APoint: TPoint): Single;
C++
float Angle(const TPoint& P) const _ALWAYS_INLINE {
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Types.pas SystemTypes.h |
System.Types | TPoint |
Description
Calculates the angle in radians between the positive X-axis of a plane and the point given by the coordinates (X, Y) on the plane.
Angle is equivalent to Arctan2(Y, X). The angle is positive for counter-clockwise angles (upper half-plane, Y > 0), and negative for clockwise angles (lower half-plane, Y < 0).
Arctan2(0, 0)
is 0, because normally Arctan2(0, 0)
is undefined.