Skip to content

Commit 80b20dd

Browse files
StartAutomatingStartAutomating
authored andcommitted
chore: Cleaning up whitespace and fixing some examples
1 parent 36b78ac commit 80b20dd

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

Turtle.types.ps1xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ $iteration = $angle / [Math]::Floor($absAngle)
375375
# If we have no step count
376376
if (-not $StepCount) {
377377
# default to half of the angle.
378-
$StepCount = [Math]::Round($absAngle / 2)
378+
$StepCount = [Math]::Round($absAngle / 2)
379379
}
380380
# Turn this into a ratio (by default, this ratio would be `2`).
381381
$stepSize = $absAngle / $StepCount
@@ -526,10 +526,10 @@ return $this
526526
.DESCRIPTION
527527
Draws a simple Bezier curve.
528528
.EXAMPLE
529-
turtle BezierCurve 0 -100 100 -100 save ./b.svg
529+
turtle BezierCurve 0 -100 100 -100 save ./b1.svg
530530
.EXAMPLE
531531
turtle BezierCurve 0 -100 100 -100 BezierCurve 100 100 100 100 save ./b2.svg
532-
.EXAMPLE
532+
.EXAMPLE
533533
turtle @(
534534
'BezierCurve', 0, -100, 100, -100
535535
'BezierCurve', 100, 100, 100, 100
@@ -540,7 +540,7 @@ return $this
540540
'BezierCurve', 0, -100, 100, -100
541541
'BezierCurve', 100, 100, 100, 100
542542
'BezierCurve', 0, 100, -100, 100
543-
'BezierCurve', -100, -100, -100, -100
543+
'BezierCurve', -100, -100, -100, -100
544544
) save ./b4.svg
545545
.LINK
546546
https://en.wikipedia.org/wiki/B%C3%A9zier_curve
@@ -564,16 +564,15 @@ $DeltaY
564564
)
565565

566566

567-
568567
if ($DeltaX -or $DeltaY) {
569-
$this.Position = $DeltaX, $DeltaY
568+
$this.Position = $DeltaX,$DeltaY
570569
# If the pen is down
571570
if ($this.IsPenDown) {
572571
# draw the curve
573-
$this.Steps.Add("s $ControlX $ControlY $DeltaX $DeltaY")
572+
$this.Steps.Add("s $controlX $controlY $deltaX $deltaY")
574573
} else {
575574
# otherwise, move to the deltaX/deltaY
576-
$this.Steps.Add("m $DeltaX $DeltaY")
575+
$this.Steps.Add("m $deltaX $deltaY")
577576
}
578577
}
579578

@@ -3995,7 +3994,6 @@ param(
39953994
# The DeltaY
39963995
[double]$DeltaY = 0
39973996
)
3998-
39993997
# If both coordinates are empty, there is no step
40003998
if ($DeltaX -or $DeltaY) {
40013999
$this.Position = $DeltaX, $DeltaY
@@ -4174,7 +4172,7 @@ $X,
41744172
$Y
41754173
)
41764174

4177-
$deltaX = $x - $this.X
4175+
$deltaX = $x - $this.X
41784176
$deltaY = $y - $this.Y
41794177
$penState = $this.IsPenDown
41804178
$this.IsPenDown = $false
@@ -6035,7 +6033,7 @@ return $this.PathAttribute['marker-start']
60356033

60366034
If this is set to a string without spaces, it will be be treated as an identifier.
60376035
.EXAMPLE
6038-
turtle viewbox 200 start 50 100 rotate 45 forward 100 markerEnd (
6036+
turtle viewbox 200 start 50 100 rotate 45 forward 100 markerStart (
60396037
turtle rotate -90 polygon 10 3 fill context-fill stroke context-stroke
60406038
) fill '#4488ff' stroke '#224488' strokewidth '3%' save ./marker.svg
60416039
.EXAMPLE
@@ -6309,8 +6307,9 @@ $newAnimation = @(foreach ($animation in $PathAnimation) {
63096307
}
63106308
})
63116309

6312-
if ($this.PathAnimation) {
6313-
$newAnimation = @($this.PathAnimation) + $newAnimation
6310+
$pathAnimation = $this.PathAnimation
6311+
if ($pathAnimation) {
6312+
$newAnimation = @($pathAnimation) + $newAnimation
63146313
}
63156314
$this | Add-Member -MemberType NoteProperty -Force -Name '.PathAnimation' -Value $newAnimation
63166315

@@ -7079,6 +7078,7 @@ $x, $y = $xy
70797078
if (-not $this.'.Position') {
70807079
$this | Add-Member -MemberType NoteProperty -Force -Name '.Position' -Value ([Numerics.Vector2]@{ X = 0; Y = 0 })
70817080
}
7081+
70827082
# Modify the position without creating a new object
70837083
$this.'.Position'.X += $x
70847084
$this.'.Position'.Y += $y

0 commit comments

Comments
 (0)