13#define RADPERDEG (M_PI / 180.0)
16inline double deg2rad(
double x)
18 return (x * RADPERDEG);
20inline double rad2deg(
double x)
22 return (x / RADPERDEG);
24inline double hour2deg(
double x)
28inline double deg2hour(
double x)
32inline double hour2rad(
double x)
34 return deg2rad(hour2deg(x));
36inline double rad2hour(
double x)
38 return deg2hour(rad2deg(x));
42inline double deg2arcsec(
double x)
46inline double arcsec2deg(
double x)
50inline double deg2arcmin(
double x)
54inline double arcmin2deg(
double x)
60inline double hour2sec(
double x)
64inline double sec2hour(
double x)
68inline double hour2min(
double x)
72inline double min2hour(
double x)
78inline double dms2deg(
double d,
double m,
double s)
80 return (d + m / 60.0 + s / 3600.0);
82inline double hms2hour(
double h,
double m,
double s)
84 return (h + m / 60.0 + s / 3600.0);
87void deg2dms(
double D,
int *d,
int *m,
float *s)
90 *m = (int)((D - *d) * 60);
91 *s = (int)((D - *d) * 3600 - (*m * 60));
94void hour2hms(
double H,
int *h,
int *m,
float *s)
97 *m = (int)((H - *h) * 60);
98 *s = (int)((H - *h) * 3600 - (*m * 60));
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:42 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.