double angle_to_radian(double degree, double min, double second)
{
double flag = (degree < 0) ? -1.0 : 1.0;
if (degree < 0)
{
degree = degree * (-1.0);
}
double angle = degree + min / 60 + second / 3600;
double result = flag * (angle * PI) / 180;
return result;
}
这里提供一个PI的近似值:3.1415926535897932364626