summaryrefslogtreecommitdiff
path: root/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine.cpp')
-rw-r--r--engine.cpp2
1 files changed, 1 insertions, 1 deletions
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();