综上代码
void point_on_line(float* res, float* p, float* q, float lambda)
{
float tmp = 1 - lambda;
res[0] = tmp* p[0] + lambda * q[0];
res[1] = tmp* p[1] + lambda * q[1];
res[2] = tmp* p[2] + lambda * q[2];
}
综上代码
void point_on_line(float* res, float* p, float* q, float lambda)
{
float tmp = 1 - lambda;
res[0] = tmp* p[0] + lambda * q[0];
res[1] = tmp* p[1] + lambda * q[1];
res[2] = tmp* p[2] + lambda * q[2];
}