C#-为什么Math.Atan(1)!=接近45 [英] C# - Why is Math.Atan(1) != anything near 45

查看:157
本文介绍了C#-为什么Math.Atan(1)!=接近45的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里还有关于Atan的帖子,但我看不到任何相关答案:

There is another post here about Atan but I dont see any relevant answers:

C#-为什么使用Math.Atan(Math.Tan(x))!= x ?

Atan数学是否与tan-1相同?在我的计算器上,我这样做:

Isn't Math.Atan the same as tan-1? On my calculator I do:

tan-1(1)我得到45.

tan-1(1) and i get 45.

tan(45)= 1

tan(45) = 1

在C#中:

Math.Atan(1)= 0.78539816339744828// 距离45不远.

Math.Atan(1) = 0.78539816339744828 // nowhere near the 45.

Math.Tan(45)= 1.6197751905438615//1 dp上的< Piover2.

Math.Tan(45) = 1.6197751905438615 //1 dp over the < Piover2.

这是怎么回事?

推荐答案

C#将角度视为弧度;您的计算器正在使用度数.

C# is treating the angles as radians; your calculator is using degrees.

这篇关于C#-为什么Math.Atan(1)!=接近45的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆