We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.Forward
1 parent 725ee90 commit 0cdcc21Copy full SHA for 0cdcc21
Types/Turtle/Forward.ps1
@@ -12,9 +12,7 @@ param(
12
$Distance = 10
13
)
14
15
-#$precision = if ($this.Precision -ge 0) { $this.Precision } else { 4 }
16
-
17
-$x = $Distance * [math]::cos($this.Heading * [Math]::PI / 180)
18
-$y = $Distance * [math]::sin($this.Heading * [Math]::PI / 180)
19
+$heading = $this.Heading
+$x = $Distance * [math]::cos($heading * [Math]::PI / 180)
+$y = $Distance * [math]::sin($heading * [Math]::PI / 180)
20
return $this.Step($x, $y)
0 commit comments