Skip to content

Commit 25b97c8

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Turtle.Petal ( Fixes #119 )
1 parent 1bf9f6c commit 25b97c8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Turtle.types.ps1xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,40 @@ return $this
981981

982982
</Script>
983983
</ScriptMethod>
984+
<ScriptMethod>
985+
<Name>Petal</Name>
986+
<Script>
987+
&lt;#
988+
.SYNOPSIS
989+
Draws a petal
990+
.DESCRIPTION
991+
Draws a petal.
992+
993+
This is a combination of two arcs and rotations.
994+
.EXAMPLE
995+
turtle @('petal',100,60, 'rotate', 60 * 6)
996+
#&gt;
997+
param(
998+
[double]
999+
$Radius = 10,
1000+
1001+
[double]
1002+
$Angle = 60
1003+
)
1004+
1005+
$OppositeAngle = 180 - $Angle
1006+
1007+
1008+
$null = @(
1009+
$this.ArcRight($Radius, $angle)
1010+
$this.Rotate($OppositeAngle)
1011+
$this.ArcRight($Radius, $angle)
1012+
$this.Rotate($OppositeAngle)
1013+
)
1014+
1015+
return $this
1016+
</Script>
1017+
</ScriptMethod>
9841018
<ScriptMethod>
9851019
<Name>Polygon</Name>
9861020
<Script>

0 commit comments

Comments
 (0)