Synopsis
PDX_MSGT mth_GetAngle2DPoint(long option, double *pnt, double *angle, long *angle_status)
Purpose
Get the angle between X axis and the line through a point and the origin
Description
The angle between the X axis and the line going through a point and the origin will be computed. It can be in radians or degrees per the option chosen and is within [0, 360) degrees. An error would be issued if the point is at the origin.
Though only 2D data will be used, for convenience, the input can be of any dimension.
Input
option
Options (not used)
pnt
The point array
Output
angle
The angle [0, MTH_2_PI)
angle_status
MTH_ANGLE_CALCULATED
, Calculated an angle.
MTH_ANGLE_POINT_ORIGIN
, Point to close to origin to calculate an angle.
Tolerances
MTH_ZERO_TOL
.fi
Return
MTH_NOERR
Low level error return
.fi