//计算数组的积累值,tuple数组中每个元素必须都是数字,输入[1,2,3,4],则输出[1,3,6,10],如果输入的有浮点数,则输出结果也会出现浮点数
void testTupleCumul()
{
HTuple tuple;
for (int i = 0; i < 10; i++)
{
tuple[i] = i;
}
for (int i = 0; i < 10; i++)
{
cout << (Hlong)tuple[i] << " ";
}
cout << endl;
HTuple result = tuple.TupleCumul();
for (int i = 0; i < 10; i++)
{
cout << (Hlong)result[i] << " ";
}
}
//转化数组中的值从弧度到角度.
void testTupleDeg()
{
HTuple tuple;
for (int i = 0; i < 10; i++)
{
tuple[i] = i;
}
for (int i = 0; i < 10; i++)
{
cout <
halcon学习 tuple之算术运算2
最新推荐文章于 2024-07-08 10:47:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)