有关C/C++中sin函数的问题,请高人回答const int sinTable[11] = { 0, //0 1266, //18 2407, //36 3314, //54 3895, //72 4096, //90 3895, //108 3314, //126 2407, //144 1266, //162 0 //180};这个数组里的数除以4096约等于
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 06:03:46
有关C/C++中sin函数的问题,请高人回答const int sinTable[11] = { 0, //0 1266, //18 2407, //36 3314, //54 3895, //72 4096, //90 3895, //108 3314, //126 2407, //144 1266, //162 0 //180};这个数组里的数除以4096约等于
有关C/C++中sin函数的问题,请高人回答
const int sinTable[11] =
{
0, //0
1266, //18
2407, //36
3314, //54
3895, //72
4096, //90
3895, //108
3314, //126
2407, //144
1266, //162
0 //180
};
这个数组里的数除以4096约等于sin(0,18……180)的值,我想知道这组数是怎么算出来的?
有关C/C++中sin函数的问题,请高人回答const int sinTable[11] = { 0, //0 1266, //18 2407, //36 3314, //54 3895, //72 4096, //90 3895, //108 3314, //126 2407, //144 1266, //162 0 //180};这个数组里的数除以4096约等于
int a[12];
double x = 0;
for(int i=0; x < 3.1415926; x += 0.31415926)
{
a[i] = sin(x) * 4096 + 0.5;
cout