查看: 1096|回复: 5
|
用C++做math
[复制链接]
|
|
问一个问题:
如果给两个point和radius,
用programmming C++怎样找center point? |
|
|
|
|
|
|
|
发表于 29-11-2007 09:39 PM
|
显示全部楼层
首先, list down 所有的equations:
x1 - xcentre = r cos ( atan2( y1- ycentre, x1 - xcentre))
y1 - ycentre = r sin ( atan2( y1- ycentre, x1 - xcentre))
x2 - xcentre = r cos ( atan2 (y2 - ycentre, x2 - xcentre))
y2 - ycentre = r sin (atan2 ( y2 -ycentre, x2 - xcentre)) |
|
|
|
|
|
|
|

楼主 |
发表于 30-11-2007 12:38 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-11-2007 02:25 PM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 30-11-2007 03:50 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-11-2007 10:21 PM
|
显示全部楼层
从error msg 来看
我猜测 你有一个 obj 的declaration 是在某case 里
,然后却有用在另某case里 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|