Skip to content

Commit 0cdcc21

Browse files
feat: Turtle.Forward rounding later ( re #225 )
1 parent 725ee90 commit 0cdcc21

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Types/Turtle/Forward.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ param(
1212
$Distance = 10
1313
)
1414

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-
15+
$heading = $this.Heading
16+
$x = $Distance * [math]::cos($heading * [Math]::PI / 180)
17+
$y = $Distance * [math]::sin($heading * [Math]::PI / 180)
2018
return $this.Step($x, $y)

0 commit comments

Comments
 (0)