NX二次开发-UFUN计算两点距离(二维向量)UF_VEC2_distance

NX11+VS2013

#include <uf.h>
#include <uf_ui.h>
#include <uf_vec.h>


UF_initialize();

//计算两点之间的距离(二维向量)
double pnt1[2] = { 10, 0 };
double pnt2[2] = { 55, 60};
double distance = 0;
UF_VEC2_distance(pnt1, pnt2, &distance);

char msg[256];
sprintf(msg, "两点之间距离为:%f", distance);
uc1601(msg, 1);

UF_terminate();

阿飞
2021年10月10日

 

阿飞

2021年10月10日

原文地址:https://www.cnblogs.com/nxopen2018/p/15391317.html