on the stage铃声:能帮我解释一下下面的小程序马?
来源:百度文库 编辑:高校问答 时间:2024/05/09 14:43:32
void DrawHand(int x,int y,float th,int l,int color)
{
int x1,y1;
x1=x+l*sin(th);
y1=y-l*cos(th);
setcolor(color);
line(x,y,x1,y1);
}最好具体点,谢谢
{
int x1,y1;
x1=x+l*sin(th);
y1=y-l*cos(th);
setcolor(color);
line(x,y,x1,y1);
}最好具体点,谢谢
用color为颜色画了一条
y1= y - tg(th)*(x1+x)
的斜线 tg(th)=斜率k