From 5617a74a7d49cee3486a9af93887a325dba4aa6f Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 3 Oct 2015 22:08:01 +0200 Subject: bugfix (already) --- engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine.cpp b/engine.cpp index 7e178ff..58ebf63 100644 --- a/engine.cpp +++ b/engine.cpp @@ -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(); -- cgit v1.2.3-54-g00ecf