Loading

弹球距离

 

 

 1 double dist( double h, double p )
 2 {
 3     double sum = h;
 4     while(h*p >= TOL)
 5     {
 6         h *= p;
 7         sum += h*2;
 8     }
 9     return sum;
10 }

 

posted @ 2018-09-27 15:01  拾月凄辰  阅读(345)  评论(0编辑  收藏  举报