Skip to content

Commit 85b567c

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Turtle.Forward rounding later ( re #225 )
1 parent 0cdcc21 commit 85b567c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Turtle.types.ps1xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,11 +1394,9 @@ param(
13941394
$Distance = 10
13951395
)
13961396

1397-
#$precision = if ($this.Precision -ge 0) { $this.Precision } else { 4 }
1398-
1399-
$x = $Distance * [math]::cos($this.Heading * [Math]::PI / 180)
1400-
$y = $Distance * [math]::sin($this.Heading * [Math]::PI / 180)
1401-
1397+
$heading = $this.Heading
1398+
$x = $Distance * [math]::cos($heading * [Math]::PI / 180)
1399+
$y = $Distance * [math]::sin($heading * [Math]::PI / 180)
14021400
return $this.Step($x, $y)
14031401

14041402
</Script>

0 commit comments

Comments
 (0)