数学计算
三角函数
/*
测试sinf cosf函数
日志:
2021.12.15 建立 可用
*/
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/common/common_headers.h>
#include <boost/thread/thread.hpp>
using namespace std;
int main()
{
uint8_t r(255), g(15), b(15);
float radius = 2;
float angle1 = 30.0, angle2 = 60;
cout << pcl::deg2rad(angle1) << endl; //验证正确,角度转弧度
cout << sinf(pcl::deg2rad(angle1)) << endl;//验证正确,所以这个函数应该是输入是弧度,不能输入角度,所以想要知道一个角度的正弦值,要先转换成弧度
getchar();
return 0;
}