如何将罪的价值转换为角度?
例如,我的值为 0.70,它是 45 度的 sin()。我需要一个函数,它可以计算出与 sin 的角度。 C++ 中的哪些函数可以帮助我?
For example I have a value 0.70, and it is a sin() for 45 degrees. I need a function, that will calculate me an angle from a sin. What function from C++ can help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
std :: Asin
。这将返回[-pi/2,+pi/2]
之间的值,以使您的学位乘以180
,并通过pi
进行除法。结果= std :: asin(value) * 180/pi
pi = 3.1415926535
You can use
std::asin
. This returns a value between[-PI/2,+PI/2]
, to get degrees you multiply by180
and divide byPI
.result = std::asin(value) * 180 / PI
PI = 3.1415926535