summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--objects.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 7d1b995..0f0514d 100644
--- a/objects.js
+++ b/objects.js
@@ -3358,7 +3358,7 @@ SpriteMorph.prototype.forward = function (meters) {
var diffLat, diffLon;
diffLat = Math.cos(radians(this.heading)) * (1 / 110.54 * kilometers);
diffLon = Math.sin(radians(this.heading))
- * (1 / (111.32 * Math.cos(radians(this.xPosition()))) * kilometers);
+ * (1 / (111.32 * Math.cos(radians(this.yPosition()))) * kilometers);
// TODO: "0 - ..." – why does this work? The formula above looks wrong ;-)
var diffPoint = new Point(diffLon, 0 - diffLat);