如果我们知道半径和角度,如何找到圆弧段的面积? [英] How to find the area of a segment of a circle if we know the radius and an angle?
本文介绍了如果我们知道半径和角度,如何找到圆弧段的面积?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在查找圆弧段的区域时遇到一些问题.
I have some problems to find an area of a segment of a circle.
我尝试使用此公式,但得到了另一个结果,例如在这里 http://planetcalc.com/1421/,我使用计算器圆弧段区域从终端检查我的结果.
I try to use this formula but have another result, as here http://planetcalc.com/1421/ , i use calculator circle segment area to check my result from terminal.
我的代码:
#define PI 3.14159265
double r = 12;
double a = 22;
double result = ((r*r)/2)*(PI*(a/180)-sin(a));
推荐答案
您必须稍微更正sin
计算,它看起来应该像这样:
You have to correct your sin
calculations a bit, it should look like this:
sin(M_PI * angle / 180)
这篇关于如果我们知道半径和角度,如何找到圆弧段的面积?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文