Skip to content

Commit aacd19a

Browse files
feat: Turtle.Spokes ( Fixes #291 )
Adding examples and updating docs
1 parent 8ade91a commit aacd19a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Types/Turtle/Spokes.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
.DESCRIPTION
55
Draws spokes of a wheel, or sticks around a point.
66
.NOTES
7-
This was adapter from Cynthia Solomon's example on LogoThings
7+
This was adapted from Cynthia Solomon's example on LogoThings
88
.LINK
99
https://logothings.github.io/logothings/logo/Sticks.html
10+
.EXAMPLE
11+
turtle spokes 42 4
1012
.EXAMPLE
1113
turtle spokes 42 5
1214
.EXAMPLE
1315
turtle spokes 42 6
1416
.EXAMPLE
15-
turtle spokes 42 8
17+
turtle spokes 42 8
1618
.EXAMPLE
1719
turtle spokes 42 6 morph @(
1820
turtle spokes 42 6
@@ -87,6 +89,6 @@ $SpokeCount = 6
8789
$spokeAngle = 360 / $SpokeCount
8890

8991
foreach ($n in 1..$([Math]::Abs($SpokeCount))) {
90-
$this = $this.Forward($radius).Backward($radius * 2).Forward($radius).Rotate($spokeAngle)
92+
$this = $this.Forward($radius).Backward($radius).Rotate($spokeAngle)
9193
}
9294
return $this

0 commit comments

Comments
 (0)