Actionscript 3 Actionscript3.0-为什么Math.cos(35.26)的值是负数?

Actionscript 3 Actionscript3.0-为什么Math.cos(35.26)的值是负数?,actionscript-3,degrees,radians,Actionscript 3,Degrees,Radians,我很困惑。我需要在中学学习数学吗 因为你要通过度,Math.cos()需要弧度: trace(Math.cos(45)); //0.5253219888177297 trace(Math.cos(30)); //0.15425144988758405 trace(Math.cos(35.264)); //-0.7606511017750149 trace(Math.cos(toRad(45))); //0.7071067811865476 trace(Math.cos(toRad(30

我很困惑。我需要在中学学习数学吗

因为你要通过度,
Math.cos()
需要弧度:

trace(Math.cos(45));
//0.5253219888177297

trace(Math.cos(30));
//0.15425144988758405

trace(Math.cos(35.264));
//-0.7606511017750149

trace(Math.cos(toRad(45)));
//0.7071067811865476

trace(Math.cos(toRad(30)));
//0.8660254037844387

trace(Math.cos(toRad(35.264)));
//0.8165005076106897

function toRad($deg:Number):Number 
{
    return ($deg/180)*Math.PI;
}