Skip to content

Commit 23408ef

Browse files
fix: Fixing GoTo/Teleport position tracking ( Fixes #90 )
1 parent 081f5b6 commit 23408ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Types/Turtle/GoTo.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ if ($this.IsPenDown) {
2525
} else {
2626
$this.Steps += " m $deltaX $deltaY"
2727
}
28-
$this.Position = $x, $y
28+
$this.Position = $deltaX, $deltaY
2929
return $this

Types/Turtle/Teleport.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ $Y
1919
$deltaX = $x - $this.X
2020
$deltaY = $y - $this.Y
2121
$this.Steps += "m $deltaX $deltaY"
22-
$this.Position = $x, $y
22+
$this.Position = $deltaX, $deltaY
2323
return $this

0 commit comments

Comments
 (0)