File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -4716,6 +4716,39 @@ if ($DeltaX -or $DeltaY) {
47164716 }
47174717}
47184718
4719+ return $this
4720+
4721+ </Script >
4722+ </ScriptMethod >
4723+ <ScriptMethod >
4724+ <Name >StepCurve</Name >
4725+ <Script >
4726+ < #
4727+ .SYNOPSIS
4728+ Takes a curved step
4729+ .DESCRIPTION
4730+ Makes a relative movement with a curve.
4731+ .EXAMPLE
4732+ turtle viewbox 20 teleport 10 0 stepCurve 5 5 stepCurve -5 0 stepCurve 0 -5 closepath
4733+ #>
4734+ param(
4735+ # The DeltaX
4736+ [double]$DeltaX = $(Get-Random -Min 0 -Max 100.0),
4737+ # The DeltaY
4738+ [double]$DeltaY = $(Get-Random -Min 0 -Max 100.0)
4739+ )
4740+
4741+ # If both coordinates are empty, there is no step
4742+ if ($DeltaX -or $DeltaY) {
4743+
4744+ $this.Position = $DeltaX, $DeltaY
4745+ if ($This.IsPenDown) {
4746+ $this.Steps.Add(" t $deltaX $deltaY")
4747+ } else {
4748+ $this.Steps.Add(" m $DeltaX $DeltaY")
4749+ }
4750+ }
4751+
47194752return $this
47204753
47214754 </Script >
You can’t perform that action at this time.
0 commit comments