2010年1月11日 星期一

已知三邊或斜率來換算角度

var angle =Math.atan(tan)*(180/Math.PI);
trace(angle);

//(180/Math.PI)弧度化角度乘的180/PI
//sin=對邊/斜邊
//cos=鄰邊/斜邊
//tan=對邊/鄰邊
//cot=鄰邊/對邊

沒有留言:

張貼留言