Skip to content

Commit

Permalink
Bug Fix:
Browse files Browse the repository at this point in the history
turtle.distance(otherturtle) was always returning 0
  • Loading branch information
bnmnetp committed Feb 26, 2013
1 parent c3c8d70 commit a1bbb20
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/builtin.js

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions dist/skulpt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/turtle/__init__.js
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ var $builtinmodule = function(name) {
if ((typeof(tx)).toLowerCase() === 'number') {
tx = [tx, ty, 0];
} else {
tx = [self.theTurtle.getx(), self.theTurtle.gety(), 0];
tx = [tx.theTurtle.getx(), tx.theTurtle.gety(), 0];
}
return self.theTurtle.distance(tx);
});
Expand Down

0 comments on commit a1bbb20

Please sign in to comment.