File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,26 @@ describe Turtle {
1919 $png [1 .. 3 ] -as ' char[]' -as ' string[]' -join ' ' | Should - Be PNG
2020 }
2121
22+ it ' Can draw an arc' {
23+ $Radius = 1
24+ $t = turtle ArcRight $Radius 360
25+ $Heading = 180.0
26+ [Math ]::Round($t.Width , 1 ) | Should - Be ($Radius * 2 )
27+ [Math ]::Round($t.Heading , 1 ) | Should - Be 360.0
28+
29+ $Radius = 1
30+ $Heading = 180.0
31+ $t = turtle ArcRight $Radius 180
32+ [Math ]::Round($t.Width , 1 ) | Should - Be ($Radius * 2 )
33+ [Math ]::Round($t.Heading , 1 ) | Should - Be $Heading
34+
35+ $Radius = 1
36+ $Heading = 90.0
37+ $t = turtle ArcRight $Radius $Heading
38+ [Math ]::Round($t.Width , 1 ) | Should - Be ($Radius * 4 )
39+ [Math ]::Round($t.Heading , 1 ) | Should - Be $Heading
40+ }
41+
2242
2343 context ' Turtle Directions' {
2444 it ' Can tell you the way towards a point' {
You can’t perform that action at this time.
0 commit comments