本文介绍了实际上as3 math.sin是如何工作的?功能与科学计算器相同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好大家



实际上math.sin()如何在as3中工作?

我对我得到的结果感到困惑



i尝试跟踪(math.sin(180))



实际上我应该是0,

但是我得到-0.8011526357338304



我也尝试跟踪(math.sin(90))

它应该是1

但是我得到了0.8939966636005579



和一些价值是负的(正如我对正弦计算的理解,价值在0 - 179之间应该是积极的)



有人可以纠正我的错误吗?



我尝试了什么:



i试用这段代码



trace(数学。罪(180))

结果是-0.8011526357338304



除了math.sin(0)

解决方案

hello everyone

how actually math.sin() works in as3??
i'm confuse with the result i got

i try to trace(math.sin( 180 ))

in reality i should be 0,
but i got -0.8011526357338304

and i also try trace(math.sin(90))
it should be 1
but i got 0.8939966636005579

and some of the value was negative ( as what i understand about calcuation of sine , value in between 0 - 179 should be postive )

can someone pls correct my mistake ?

What I have tried:

i have try this code

trace(math.sin(180))
result was -0.8011526357338304

and other value was incorrect besides math.sin(0)

解决方案


这篇关于实际上as3 math.sin是如何工作的?功能与科学计算器相同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 21:59