Skip to content

Commit 6f710c5

Browse files
feat: Turtle.Horizontal/VerticalLine ( Fixes #126 )
1 parent b373046 commit 6f710c5

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

Types/Turtle/Alias.psd1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@
1818
bk = 'Backward'
1919
ArcR = 'ArcRight'
2020
ArcL = 'ArcLeft'
21+
HLineBy = 'HorizontalLine'
22+
VLineBy = 'VerticalLine'
2123
}

Types/Turtle/HorizontalLine.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<#
2+
.SYNOPSIS
3+
Draws a horizontal line
4+
.DESCRIPTION
5+
Draws a horizontal line.
6+
7+
The heading will not be changed.
8+
#>
9+
param(
10+
[double]
11+
$Distance
12+
)
13+
14+
15+
$this.GoTo($this.Position.X + $Distance, $this.Position.Y)

Types/Turtle/VerticalLine.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<#
2+
.SYNOPSIS
3+
Draws a vertical line
4+
.DESCRIPTION
5+
Draws a vertical line.
6+
7+
The heading will not be changed.
8+
#>
9+
param(
10+
[double]
11+
$Distance
12+
)
13+
14+
$this.GoTo($this.Position.X, $this.Position.Y + $Distance)

0 commit comments

Comments
 (0)