File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1867,6 +1867,38 @@ foreach ($n in 1..$Points) {
18671867
18681868 </Script >
18691869 </ScriptMethod >
1870+ <ScriptMethod >
1871+ <Name >Step</Name >
1872+ <Script >
1873+ < #
1874+ .SYNOPSIS
1875+ Takes a Step
1876+ .DESCRIPTION
1877+ Makes a relative movement.
1878+ .EXAMPLE
1879+ turtle step 5 5 step 0 -5 step -5 0 save ./stepTriangle.svg
1880+ #>
1881+ param(
1882+ # The DeltaX
1883+ [double]$DeltaX = 0,
1884+ # The DeltaY
1885+ [double]$DeltaY = 0
1886+ )
1887+
1888+ # If both coordinates are empty, there is no step
1889+ if ($DeltaX -or $DeltaY) {
1890+ $this.Position = $DeltaX, $DeltaY
1891+ if ($This.IsPenDown) {
1892+ $this.Steps += " l $DeltaX $DeltaY"
1893+ } else {
1894+ $this.Steps += " m $DeltaX $DeltaY"
1895+ }
1896+ }
1897+
1898+ return $this
1899+
1900+ </Script >
1901+ </ScriptMethod >
18701902 <ScriptMethod >
18711903 <Name >StepSpiral</Name >
18721904 <Script >
You can’t perform that action at this time.
0 commit comments