定义一个change类,用以实现角度和弧度的转换,用C++

2024-11-15 10:14:52
推荐回答(1个)
回答(1):

class change
{
public:
double RadianToAngle(double);
double AngleToRadian(double);
};
double change::RadianToAngle(double R)
{
return R*180/3.1416;
}
double change::AngleToRadian(double A)
{
return A*3.1416/180;
}