diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-10-03 22:08:01 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-10-03 22:08:01 +0200 |
commit | 5617a74a7d49cee3486a9af93887a325dba4aa6f (patch) | |
tree | 9165351d8b19472b7947577d016c346933f1b993 | |
parent | 0eb6ce70981deb5b711f49c77930c49181f59d95 (diff) |
bugfix (already)
-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(); |