When dealing with celestial coordinate systems and spherical projections (some moreso than others) it is often desirable to use an angular measure that provides an exact representation of the latitude of the north or south pole. The WCSLIB routines use the following trigonometric functions that take or return angles in degrees:
These "trigd" routines are expected to handle angles that are a multiple of returning an exact result. Some C implementations provide these as part of a system library and in such cases it may (or may not!) be preferable to use them. WCSLIB provides wrappers on the standard trig functions based on radian measure, adding tests for multiples of .
However, wcstrig.h also provides the choice of using preprocessor macro implementations of the trigd functions that don't test for multiples of (compile with -DWCSTRIG_MACRO). These are typically 20% faster but may lead to problems near the poles.
atan2d() returns the polar angle, , in degrees, of polar coordinates corresponding to Cartesian coordinates . It is equivalent to the function of WCS Paper II, though with transposed arguments.
Parameters
[in]
y
Cartesian -coordinate.
[in]
x
Cartesian -coordinate.
Returns
Polar angle of [deg].
Generated on Thu Jul 6 2023 03:13:18 for WCSLIB by 1.9.7