已知圆半径和外接正多边形边数求边长

pi = acos(-1);
double getlen(int n,double r) { return 2.0*r*tan(pi/n);

}
posted @ 2016-10-03 18:32  十目  阅读(661)  评论(0编辑  收藏  举报