Sco*_*lus 15
仅按质量加权平均值有什么问题吗?
for each point n
{
totalmass += n.mass
totalx += n.x*n.mass
totaly += n.y*n.mass
}
center = (totalx/totalmass,totaly/totalmass)
Run Code Online (Sandbox Code Playgroud)
根据需要添加其他尺寸.
| 归档时间: |
|
| 查看次数: |
13742 次 |
| 最近记录: |