From 0563e7837893013ae45a508aa3ece846d64ac3b2 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 7 Mar 2000 15:10:07 +0000 Subject: * D�placement de fonctions g�om�triques vers Geo. --- generic/Track.c | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/generic/Track.c b/generic/Track.c index a5e17dc..9a1461f 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -298,58 +298,6 @@ static ZnAttrConfig wp_attrs[] = { }; -/* - ********************************************************************************** - * - * PointPolarToCartesian -- - * Convert a point in polar coordinates in - * a reference system described by heading - * dx_ref, dy_ref to a point in cartesian - * coordinates. - * - ********************************************************************************** - */ -static ZnReal -ProjectionToAngle(ZnDim dx, - ZnDim dy) -{ - if (dx == 0) { - if (dy < 0) { - return -M_PI_2; - } - else if (dy > 0) { - return M_PI_2; - } - else { - return 0.0; - } - } - else if (dx < 0) { - return atan((double) dy / (double) dx) - M_PI; - } - else { - return atan((double) dy / (double) dx); - } - return 0.0; -} - -static void -PointPolarToCartesian(ZnReal heading, - int rho, - int theta, - int *delta_x, - int *delta_y) -{ - double to_angle; - - /* Compute angle in trigonometric system */ - to_angle = DegreesToRadian(theta) + heading - M_PI_2; - /* to_angle = heading - DegreesToRadian(theta);*/ - /* Compute cartesian coordinates */ - *delta_x = (int) (rho * cos(to_angle)); - *delta_y = (int) (rho * sin(to_angle)); -} - /* ********************************************************************************** -- cgit v1.1