File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ if (-not $this .' .Position' ) {
2+ $this | Add-Member - MemberType NoteProperty - Force - Name ' .Position' - Value [pscustomobject ]@ { X = 0 ; Y = 0 }
3+ }
4+ return $this .' .Position'
Original file line number Diff line number Diff line change 1+ param ([double []]$xy )
2+ $x , $y = $xy
3+ if (-not $this .' .Position' ) {
4+ $this | Add-Member - MemberType NoteProperty - Force - Name ' .Position' - Value ([pscustomobject ]@ { X = 0 ; Y = 0 })
5+ }
6+ $this .' .Position' .X += $x
7+ $this .' .Position' .Y += $y
8+ $posX , $posY = $this .' .Position' .X, $this .' .Position' .Y
9+ if (-not $this .' .Minimum' ) {
10+ $this | Add-Member - MemberType NoteProperty - Force - Name ' .Minimum' - Value ([pscustomobject ]@ { X = 0 ; Y = 0 })
11+ }
12+ if (-not $this .' .Maximum' ) {
13+ $this | Add-Member - MemberType NoteProperty - Force - Name ' .Maximum' - Value ([pscustomobject ]@ { X = 0 ; Y = 0 })
14+ }
15+ if ($posX -lt $this .' .Minimum' .X) {
16+ $this .' .Minimum' .X = $posX
17+ }
18+ if ($posY -lt $this .' .Minimum' .Y) {
19+ $this .' .Minimum' .Y = $posY
20+ }
21+ if ($posX -gt $this .' .Maximum' .X) {
22+ $this .' .Maximum' .X = $posX
23+ }
24+ if ($posY -gt $this .' .Maximum' .Y) {
25+ $this .' .Maximum' .Y = $posY
26+ }
You can’t perform that action at this time.
0 commit comments