一个函数,怎么返回一个以上的值?
比如,我要得到任意三点(不共面)的外接圆圆心坐标和半径
double radiu(double x1,double x2,double x3,double y1,double y2,double y3)
{
double radiu;
double x=0;
double y=0;
x=((y2-y1)*(y3*y3-y1*y1+x3*x3-x1*x1)-(y3-y1)*(y2*y2-y1*y1+x2*x2-x1*x1))/(2*(x3-x1)*(y2-y1)-2*((x2-x1)*(y3-y1)));
y=((x2-x1)*(x3*x3-x1*x1+y3*y3-y1*y1)-(x3-x1)*(x2*x2-x1*x1+y2*y2-y1*y1))/(2*(y3-y1)*(x2-x1)-2*((y2-y1)*(x3-x1)));
radiu=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y));
return radiu;
}
这样,只能返回半径radiu的值啊,怎么再能得到圆心坐标x和y的值呢?