17 # define RpD ((2 * M_PI) / 360.)
18 # define D2R(d) (double)(d * RpD)
19 # define R2D(d) (double)(d / RpD)
40 double c = cos(
D2R(angle));
41 double s = sin(
D2R(angle));
42 double dx1 = dx * c - dy *
s;
43 double dy1 = dx * s + dy * c;
64 double x = (double)*X1;
65 double y = (double)*Y1;
72 *X1 = (
int)floor(x + 0.5);
73 *Y1 = (
int)floor(y + 0.5);
void G_rotate_around_point(double X0, double Y0, double *X1, double *Y1, double angle)
Rotate point (double version)
void G_rotate_around_point_int(int X0, int Y0, int *X1, int *Y1, double angle)
Rotate point (int version)