cocos2d-js使用Math.sin(),Math.cos()

在cocos游戏种,有时候会使用角度的转换,例如:想得到35°的sin值大小,这时候需要把角度转换成弧度,
Math.sin( 35 * ( Math.PI / 180)。cos同理。

猜你喜欢

转载自blog.csdn.net/kang_lee/article/details/77713699