转换关系
radians = degrees x Π / 180
degrees = radians x 180 / Π
#ifndef TRIG_H
#define TRIG_H
#include <iostream.h>
#include <math.h>
double radians (double d);
double degrees (double r);
#endif
#include "trig.h"
double radians (double d) {
return d * M_PI / 180;
}
double degrees (double r) {
return r * 180/ M_PI;
}
标签:include,转换,double,TRIG,radians,弧度,角度,degrees,180
From: https://www.cnblogs.com/sunwenqi/p/17331100.html