diff options
Diffstat (limited to 'engine.cpp')
-rw-r--r-- | engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,7 +58,7 @@ void logocommand(const char *str){ if(tkns[i]=="forward"||tkns[i]=="fd"){ if(i+1>=ntkns)assert(false); const int n=stoi(tkns[i+1]); - const int newx=turtle.x+n*sin(turtle.dir*M_PI/180),newy=turtle.y-n*cos(turtle.dir*M_PI/180); + const double newx=turtle.x+n*sin(turtle.dir*M_PI/180),newy=turtle.y-n*cos(turtle.dir*M_PI/180); drawline(turtle.x,turtle.y,newx,newy); turtle.x=newx; turtle.y=newy; drawturtle(); |