Skip to content

Commit 76c9c35

Browse files
feat: Turtle Maximum Vector ( Fixes #275 )
1 parent 7fae6d3 commit 76c9c35

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Types/Turtle/get_Maximum.ps1

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<#
22
.SYNOPSIS
3-
Gets the turtle maximum point.
3+
Gets the turtle's highest point.
44
.DESCRIPTION
5-
Gets the maximum point reached by the turtle.
5+
Gets the maximum point vector visited by the turtle.
66
7-
Keeping track of this as we go is far more efficient than calculating it from the path.
7+
This would the highest point that the turtle has been.
88
#>
9-
if ($this.'.Maximum') {
10-
return $this.'.Maximum'
9+
[OutputType([Numerics.Vector2])]
10+
param()
11+
if (-not $this.'.Maximum') {
12+
$this | Add-Member NoteProperty '.Maximum' ([Numerics.Vector2]::new(0,0)) -Force
1113
}
12-
return ([pscustomobject]@{ X = 0; Y = 0 })
14+
15+
return $this.'.Maximum'

0 commit comments

Comments
 (0)