diff --git a/stitchcode/objects.js b/stitchcode/objects.js index 448ddb94..8d4d86f7 100644 --- a/stitchcode/objects.js +++ b/stitchcode/objects.js @@ -212,8 +212,8 @@ SpriteMorph.prototype.forward = function (steps) { }; SpriteMorph.prototype.forwardByNr = function (totalsteps, nr_steps) { - stepsize = totalsteps / nr_steps; - rest = totalsteps - Math.floor(nr_steps * stepsize); + stepsize = Math.floor(totalsteps / nr_steps); + rest = totalsteps - (nr_steps * stepsize); for(i=0;i