summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-10-03 22:08:01 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-10-03 22:08:01 +0200
commit5617a74a7d49cee3486a9af93887a325dba4aa6f (patch)
tree9165351d8b19472b7947577d016c346933f1b993
parent0eb6ce70981deb5b711f49c77930c49181f59d95 (diff)
bugfix (already)
-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();