/* * GRacer * * Copyright (C) 1999 Takashi Matsuda * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __GRACER_ANGLE_H__ #define __GRACER_ANGLE_H__ #define DEG(a) (180.0 / M_PI * (a)) #define RAD(a) (M_PI / 180.0 * (a)) #ifdef __cplusplus extern "C" { #endif #if 0 } #endif /* angle is represented as degree */ double gr_angle_add_deg (double deg1, double deg2); #define gr_angle_sub_deg(deg1,deg2) gr_angle_add_deg((deg1),-(deg2)) /* angle is represented as radian */ double gr_angle_add_rad (double rad1, double rad2); #define gr_angle_sub_rad(rad1,rad2) gr_angle_add_rad((rad1),-(rad2)) #ifdef __cplusplus } #endif #endif /* __GRACER_ANGLE_H__ */