This repository has been archived on 2026-10-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
KNZ_GeoTrackLab/headers/degRrad.h
T
2024-09-23 10:44:47 +08:00

28 lines
716 B
C

#ifndef _DEGRRAD_H_
#define _DEGRRAD_H_
#include"public.h"
/* -------------------------------------------------------------------------- */
/// @brief 角度转弧度
/// @param deg
/// @return 返回弧度
/* -------------------------------------------------------------------------- */
double deg2rad(double deg)
{
double rad = (PI / 180) * deg;
return rad;
}
/* -------------------------------------------------------------------------- */
/// @brief 弧度转角度
/// @param rad
/// @return 返回角度
/* -------------------------------------------------------------------------- */
double rad2deg(double rad)
{
double deg = (180 / PI) * rad;
return deg;
}
#endif